Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2021-01-08 22:20:32 +0000
committerRyan Brooks2021-01-20 00:59:45 +0000
commit5e322fe24cd5c094507bf08e50aa6e68ae0b93f0 (patch)
tree71510e17d46b9532113e0ca75a900f4137ada799
parenta7d8a81be3c9c483ad45a0c4a825b42f6f7db520 (diff)
downloadorg.eclipse.osee-5e322fe24cd5c094507bf08e50aa6e68ae0b93f0.tar.gz
org.eclipse.osee-5e322fe24cd5c094507bf08e50aa6e68ae0b93f0.tar.xz
org.eclipse.osee-5e322fe24cd5c094507bf08e50aa6e68ae0b93f0.zip
refactor[TW18593]: Remove org.eclipse.osee.framework.core.internal
-rw-r--r--plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/Activator.java39
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/LogProgressMonitor.java9
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/OperationBuilderImpl.java (renamed from plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java)12
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/WeightedCompositeOperation.java (renamed from plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java)6
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java30
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/OsgiUtil.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/result/XResultDataFile.java9
-rw-r--r--plugins/org.eclipse.osee.jdbc/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/META-INF/MANIFEST.MF1
12 files changed, 28 insertions, 93 deletions
diff --git a/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
index 2cb9109f85b..f5fa6e9765d 100644
--- a/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
@@ -4,7 +4,6 @@ Bundle-Name: OSEE Core Plug-in
Bundle-SymbolicName: org.eclipse.osee.framework.core;singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.26.0.qualifier
-Bundle-Activator: org.eclipse.osee.framework.core.internal.Activator
Bundle-Vendor: Eclipse Open System Engineering Environment
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.fasterxml.jackson.annotation,
@@ -58,7 +57,6 @@ Export-Package: org.eclipse.osee.framework.core,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.executor,
org.eclipse.osee.framework.core.grammar,
- org.eclipse.osee.framework.core.internal,
org.eclipse.osee.framework.core.operation,
org.eclipse.osee.framework.core.ops,
org.eclipse.osee.framework.core.sql,
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/Activator.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/Activator.java
deleted file mode 100644
index af12d513e93..00000000000
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/Activator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2004, 2007 Boeing
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Boeing - initial API and implementation
- **********************************************************************/
-
-package org.eclipse.osee.framework.core.internal;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Roberto E. Escobar
- */
-public class Activator implements BundleActivator {
- public static final String PLUGIN_ID = "org.eclipse.osee.framework.core";
- private static BundleContext bundleContext;
-
- @Override
- public void start(BundleContext context) throws Exception {
- Activator.bundleContext = context;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- Activator.bundleContext = null;
- }
-
- public static BundleContext getBundleContext() {
- return Activator.bundleContext;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/LogProgressMonitor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/LogProgressMonitor.java
index 807689a3525..121146fcf21 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/LogProgressMonitor.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/LogProgressMonitor.java
@@ -15,7 +15,6 @@ package org.eclipse.osee.framework.core.operation;
import java.util.logging.Level;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osee.framework.core.internal.Activator;
import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -36,14 +35,14 @@ public class LogProgressMonitor implements IProgressMonitor {
public void beginTask(String name, int totalWork) {
this.taskName = name;
if (!OseeProperties.isInTest()) {
- OseeLog.logf(Activator.class, Level.INFO, "Start: %s", taskName);
+ OseeLog.logf(getClass(), Level.INFO, "Start: %s", taskName);
}
}
@Override
public void done() {
if (!OseeProperties.isInTest()) {
- OseeLog.logf(Activator.class, Level.INFO, "Finish: %s", taskName);
+ OseeLog.logf(getClass(), Level.INFO, "Finish: %s", taskName);
}
}
@@ -67,7 +66,7 @@ public class LogProgressMonitor implements IProgressMonitor {
if (Strings.isValid(name)) {
this.taskName = name;
if (!OseeProperties.isInTest()) {
- OseeLog.log(Activator.class, Level.INFO, name);
+ OseeLog.log(getClass(), Level.INFO, name);
}
}
}
@@ -75,7 +74,7 @@ public class LogProgressMonitor implements IProgressMonitor {
@Override
public void subTask(String name) {
if (Strings.isValid(name)) {
- OseeLog.log(Activator.class, Level.FINER, name);
+ OseeLog.log(getClass(), Level.FINER, name);
}
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/OperationBuilderImpl.java
index c764c69abfb..81d140ff8c1 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/OperationBuilderImpl.java
@@ -11,15 +11,11 @@
* Boeing - initial API and implementation
**********************************************************************/
-package org.eclipse.osee.framework.core.internal;
+package org.eclipse.osee.framework.core.operation;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.core.enums.OperationBehavior;
-import org.eclipse.osee.framework.core.operation.IOperation;
-import org.eclipse.osee.framework.core.operation.NullOperationLogger;
-import org.eclipse.osee.framework.core.operation.OperationBuilder;
-import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.jdk.core.type.Pair;
/**
@@ -28,7 +24,6 @@ import org.eclipse.osee.framework.jdk.core.type.Pair;
public class OperationBuilderImpl implements OperationBuilder {
private final String name;
- private final String pluginId;
private OperationBehavior behavior;
private OperationLogger logger;
@@ -36,9 +31,8 @@ public class OperationBuilderImpl implements OperationBuilder {
private double runningTotal;
private int itemsWithHints;
- public OperationBuilderImpl(String name, String pluginId) {
+ public OperationBuilderImpl(String name) {
this.name = name;
- this.pluginId = pluginId;
reset();
}
@@ -106,7 +100,7 @@ public class OperationBuilderImpl implements OperationBuilder {
@Override
public synchronized IOperation build() {
- IOperation operation = new WeightedCompositeOperation(getName(), pluginId, getExecutionBehavior(), getLogger(),
+ IOperation operation = new WeightedCompositeOperation(getName(), null, getExecutionBehavior(), getLogger(),
runningTotal, itemsWithHints, operations);
reset();
return operation;
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java
index b4446d65e24..994cf893aec 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/Operations.java
@@ -19,8 +19,6 @@ import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osee.framework.core.internal.Activator;
-import org.eclipse.osee.framework.core.internal.OperationBuilderImpl;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -37,7 +35,7 @@ public final class Operations {
}
public static IOperation createNoOpOperation(String name) {
- return new AbstractOperation(name, Activator.PLUGIN_ID) {
+ return new AbstractOperation(name, null) {
@Override
protected void doWork(IProgressMonitor monitor) throws Exception {
// Do Nothing
@@ -143,7 +141,7 @@ public final class Operations {
}
public static OperationBuilder createBuilder(String operationName) {
- return new OperationBuilderImpl(operationName, Activator.PLUGIN_ID);
+ return new OperationBuilderImpl(operationName);
}
public static OperationBuilder createBuilder(String name, IOperation operation, IOperation... operations) {
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/WeightedCompositeOperation.java
index 75b3007f3ba..c84553a0cdc 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/WeightedCompositeOperation.java
@@ -11,7 +11,7 @@
* Boeing - initial API and implementation
**********************************************************************/
-package org.eclipse.osee.framework.core.internal;
+package org.eclipse.osee.framework.core.operation;
import java.util.ArrayList;
import java.util.List;
@@ -20,10 +20,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.osee.framework.core.enums.OperationBehavior;
-import org.eclipse.osee.framework.core.operation.AbstractOperation;
-import org.eclipse.osee.framework.core.operation.IOperation;
-import org.eclipse.osee.framework.core.operation.OperationLogger;
-import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
index e02e764c3fa..64fe1e5da2b 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
@@ -18,7 +18,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osee.framework.core.internal.Activator;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.jdk.core.text.Rule;
@@ -53,7 +52,7 @@ public class RenameFilesOperation extends AbstractOperation {
}
public RenameFilesOperation(OperationLogger logger, CharSequence parentFolderPath, CharSequence pathPattern, CharSequence replacement, boolean recurseFiles) {
- super("Rename Files", Activator.PLUGIN_ID, logger);
+ super("Rename Files", null, logger);
this.parentFolderPath = parentFolderPath;
this.pathPattern = pathPattern;
this.replacement = replacement;
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
index 6084c697c78..b7af4ed2b99 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
@@ -42,15 +42,12 @@ import org.eclipse.core.net.proxy.IProxyChangeEvent;
import org.eclipse.core.net.proxy.IProxyChangeListener;
import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.osee.framework.core.internal.Activator;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
/**
* @author Roberto E. Escobar
@@ -83,21 +80,18 @@ public class HttpProcessor {
private static void configureProxyData(URI uri, HostConfiguration config) {
boolean proxyBypass = OseeProperties.getOseeProxyBypassEnabled();
if (!proxyBypass) {
+
if (proxyService == null) {
- BundleContext context = Activator.getBundleContext();
- if (context != null) {
- ServiceReference<IProxyService> reference = context.getServiceReference(IProxyService.class);
- proxyService = context.getService(reference);
- }
- if (proxyService != null) {
- proxyService.addProxyChangeListener(new IProxyChangeListener() {
-
- @Override
- public void proxyInfoChanged(IProxyChangeEvent event) {
- proxiedData.clear();
- }
- });
- }
+ proxyService =
+ org.eclipse.osee.framework.core.util.OsgiUtil.getService(HttpClient.class, IProxyService.class);
+
+ proxyService.addProxyChangeListener(new IProxyChangeListener() {
+
+ @Override
+ public void proxyInfoChanged(IProxyChangeEvent event) {
+ proxiedData.clear();
+ }
+ });
}
String key = String.format("%s_%s", uri.getScheme(), uri.getHost());
@@ -112,7 +106,7 @@ public class HttpProcessor {
}
}
}
- OseeLog.logf(Activator.class, Level.INFO, "Http-Request: [%s] [%s]", requests++, uri.toASCIIString());
+ OseeLog.logf(HttpProcessor.class, Level.INFO, "Http-Request: [%s] [%s]", requests++, uri.toASCIIString());
}
public static String acquireString(URL url) throws Exception {
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/OsgiUtil.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/OsgiUtil.java
index d78377f728c..0e9c2c94b17 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/OsgiUtil.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/OsgiUtil.java
@@ -19,7 +19,6 @@ import java.io.InputStream;
import java.net.URL;
import java.util.logging.Level;
import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.osee.framework.core.internal.Activator;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -44,7 +43,7 @@ public final class OsgiUtil {
try {
tracker.close();
} catch (Exception ex) {
- OseeLog.log(Activator.class, Level.WARNING, ex);
+ OseeLog.log(OsgiUtil.class, Level.WARNING, ex);
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/result/XResultDataFile.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/result/XResultDataFile.java
index 9de542d1e10..248b6b54e00 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/result/XResultDataFile.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/result/XResultDataFile.java
@@ -18,7 +18,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.logging.Level;
-import org.eclipse.osee.framework.core.internal.Activator;
import org.eclipse.osee.framework.jdk.core.result.IResultDataListener;
import org.eclipse.osee.framework.jdk.core.result.XResultData;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -33,7 +32,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
* Used for large results cause uses file instead of StringBuffer<br/>
* <br/>
* Call dispose() after to close and remove file.
- *
+ *
* @author Donald G. Dunne
*/
public final class XResultDataFile extends XResultData {
@@ -71,7 +70,7 @@ public final class XResultDataFile extends XResultData {
try {
out = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
} catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
@@ -81,7 +80,7 @@ public final class XResultDataFile extends XResultData {
try {
out.write(str);
} catch (IOException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
}
@@ -101,7 +100,7 @@ public final class XResultDataFile extends XResultData {
try {
toReturn = Lib.fileToString(file);
} catch (IOException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ OseeLog.log(getClass(), Level.SEVERE, ex);
}
return toReturn;
}
diff --git a/plugins/org.eclipse.osee.jdbc/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.jdbc/META-INF/MANIFEST.MF
index e6f6a1fb8f0..74a7889d173 100644
--- a/plugins/org.eclipse.osee.jdbc/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.jdbc/META-INF/MANIFEST.MF
@@ -14,7 +14,6 @@ Import-Package: com.fasterxml.jackson.core,
org.apache.commons.pool.impl,
org.eclipse.core.runtime,
org.eclipse.osee.framework.core.data,
- org.eclipse.osee.framework.core.internal,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.executor,
org.eclipse.osee.framework.jdk.core.result,
diff --git a/plugins/org.eclipse.osee.orcs.core.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.orcs.core.test/META-INF/MANIFEST.MF
index 6899c14a3af..d033a3a5e67 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.orcs.core.test/META-INF/MANIFEST.MF
@@ -15,7 +15,6 @@ Import-Package: com.google.common.util.concurrent,
org.eclipse.jdt.annotation,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.enums.token,
- org.eclipse.osee.framework.core.internal,
org.eclipse.osee.framework.core.model.cache,
org.eclipse.osee.framework.core.model.mocks,
org.eclipse.osee.framework.core.model.type,

Back to the top