Skip to content

Commit

Permalink
refactor: move ProgressListener to common module
Browse files Browse the repository at this point in the history
  • Loading branch information
D-D-H committed Jan 19, 2022
1 parent 4ed3f3e commit 4d3d201
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -11,7 +11,7 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/

package org.eclipse.jifa.hda.api;
package org.eclipse.jifa.common.listener;

import java.io.PrintWriter;
import java.io.StringWriter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -11,7 +11,7 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/

package org.eclipse.jifa.hda.api;
package org.eclipse.jifa.common.listener;

class NoOpProgressListener implements ProgressListener {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -11,7 +11,7 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/

package org.eclipse.jifa.hda.api;
package org.eclipse.jifa.common.listener;

public interface ProgressListener {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -13,6 +13,8 @@

package org.eclipse.jifa.hda.api;

import org.eclipse.jifa.common.listener.ProgressListener;

public class FilterProgressListener implements ProgressListener {

ProgressListener listener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -12,6 +12,7 @@
********************************************************************************/
package org.eclipse.jifa.hda.api;

import org.eclipse.jifa.common.listener.ProgressListener;
import org.eclipse.jifa.common.vo.PageView;
import org.eclipse.jifa.common.vo.support.SearchType;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -25,7 +25,7 @@
import org.eclipse.jifa.hda.api.AnalysisException;
import org.eclipse.jifa.hda.api.HeapDumpAnalyzer;
import org.eclipse.jifa.hda.api.Model;
import org.eclipse.jifa.hda.api.ProgressListener;
import org.eclipse.jifa.common.listener.ProgressListener;
import org.eclipse.mat.SnapshotException;
import org.eclipse.mat.internal.snapshot.SnapshotQueryContext;
import org.eclipse.mat.parser.model.ClassImpl;
Expand Down Expand Up @@ -88,7 +88,7 @@

import static org.eclipse.jifa.common.vo.support.SearchPredicate.createPredicate;
import static org.eclipse.jifa.hda.api.Model.*;
import static org.eclipse.jifa.hda.api.ProgressListener.NoOpProgressListener;
import static org.eclipse.jifa.common.listener.ProgressListener.NoOpProgressListener;
import static org.eclipse.jifa.hda.impl.AnalysisContext.ClassLoaderExplorerData;
import static org.eclipse.jifa.hda.impl.AnalysisContext.DirectByteBufferData;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -14,7 +14,7 @@
package org.eclipse.jifa.hda.impl;

import org.eclipse.jifa.hda.api.FilterProgressListener;
import org.eclipse.jifa.hda.api.ProgressListener;
import org.eclipse.jifa.common.listener.ProgressListener;
import org.eclipse.mat.util.IProgressListener;

public class ProgressListenerImpl extends FilterProgressListener implements IProgressListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -15,7 +15,7 @@

import org.eclipse.jifa.common.JifaException;
import org.eclipse.jifa.hda.api.HeapDumpAnalyzer;
import org.eclipse.jifa.hda.api.ProgressListener;
import org.eclipse.jifa.common.listener.ProgressListener;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
Expand Down Expand Up @@ -60,6 +60,7 @@ private void init() {
commonBase + ".cache",
commonBase + ".vo",
commonBase + ".vo.support",
commonBase + ".listener",
"net.sf.cglib.beans",
"net.sf.cglib.core",
"net.sf.cglib.core.internal",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020, 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -13,7 +13,7 @@
package org.eclipse.jifa.worker.route.heapdump;

import org.eclipse.jifa.hda.api.HeapDumpAnalyzer;
import org.eclipse.jifa.hda.api.ProgressListener;
import org.eclipse.jifa.common.listener.ProgressListener;
import org.eclipse.jifa.worker.route.BaseRoute;
import org.eclipse.jifa.worker.route.MappingPrefix;
import org.eclipse.jifa.worker.support.Analyzer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020, 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -20,10 +20,9 @@
import org.eclipse.jifa.common.enums.ProgressState;
import org.eclipse.jifa.common.util.ErrorUtil;
import org.eclipse.jifa.common.util.FileUtil;
import org.eclipse.jifa.hda.api.DefaultProgressListener;
import org.eclipse.jifa.common.listener.DefaultProgressListener;
import org.eclipse.jifa.hda.api.HeapDumpAnalyzer;
import org.eclipse.jifa.hda.api.ProgressListener;
import org.eclipse.jifa.worker.Constant;
import org.eclipse.jifa.common.listener.ProgressListener;
import org.eclipse.jifa.worker.Worker;
import org.eclipse.jifa.worker.WorkerGlobal;
import org.slf4j.Logger;
Expand Down

0 comments on commit 4d3d201

Please sign in to comment.