summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-05-11 17:40:26 (EDT)
committerRyan D. Brooks2011-05-11 17:40:26 (EDT)
commit8d64860c39b26d8be817fd9b9131dd34eaa4d4ed (patch)
tree75a327f7ad3ba403e1b24cbc2f3b9c4eccc59b87
parent54c315ffd1e76a961a168b14804a6d1e5b8b7ffb (diff)
downloadorg.eclipse.osee-8d64860c39b26d8be817fd9b9131dd34eaa4d4ed.zip
org.eclipse.osee-8d64860c39b26d8be817fd9b9131dd34eaa4d4ed.tar.gz
org.eclipse.osee-8d64860c39b26d8be817fd9b9131dd34eaa4d4ed.tar.bz2
refactor: Improve minor code quality issues
-rw-r--r--plugins/jms.activemq.launch/META-INF/MANIFEST.MF1
-rw-r--r--plugins/jms.activemq.launch/src/jms/activemq/launch/Activator.java53
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/PurgeBranchRequestTest.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/NullOperationLogger.java13
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java7
9 files changed, 16 insertions, 75 deletions
diff --git a/plugins/jms.activemq.launch/META-INF/MANIFEST.MF b/plugins/jms.activemq.launch/META-INF/MANIFEST.MF
index d0e6a40..f024f30 100644
--- a/plugins/jms.activemq.launch/META-INF/MANIFEST.MF
+++ b/plugins/jms.activemq.launch/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Launch
Bundle-SymbolicName: jms.activemq.launch;singleton:=true
Bundle-Version: 0.9.9.qualifier
-Bundle-Activator: jms.activemq.launch.Activator
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/jms.activemq.launch/src/jms/activemq/launch/Activator.java b/plugins/jms.activemq.launch/src/jms/activemq/launch/Activator.java
deleted file mode 100644
index c960502..0000000
--- a/plugins/jms.activemq.launch/src/jms/activemq/launch/Activator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package jms.activemq.launch;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- public static final String PLUGIN_ID = "lba.messaging.activemq.launch";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/PurgeBranchRequestTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/PurgeBranchRequestTest.java
index 6dca5f1..f2dc991 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/PurgeBranchRequestTest.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/PurgeBranchRequestTest.java
@@ -32,7 +32,6 @@ public class PurgeBranchRequestTest {
private final int branchId;
public PurgeBranchRequestTest(int expectedBranchId) {
- super();
this.request = new PurgeBranchRequest(expectedBranchId, false);
this.branchId = expectedBranchId;
}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
index 201bb39..fc4d27c 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
@@ -19,7 +19,6 @@ public class PurgeBranchRequest {
private final boolean recursive;
public PurgeBranchRequest(int branchId, boolean recursive) {
- super();
this.branchId = branchId;
this.recursive = recursive;
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/NullOperationLogger.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/NullOperationLogger.java
index dc0ce7b..364c83c 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/NullOperationLogger.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/NullOperationLogger.java
@@ -1,8 +1,13 @@
-/*
- * Created on Feb 21, 2011
+/*******************************************************************************
+ * Copyright (c) 2011 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
package org.eclipse.osee.framework.core.operation;
public class NullOperationLogger extends OperationLogger {
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
index d3f7712..6804db6 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.database.core;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
+import org.eclipse.osee.framework.core.operation.NullOperationLogger;
import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
@@ -23,13 +24,12 @@ public abstract class AbstractDbTxOperation extends AbstractOperation {
private final IOseeDatabaseService databaseService;
- public AbstractDbTxOperation(IOseeDatabaseService databaseService, String operationName, String pluginId, OperationLogger logger) {
- super(operationName, pluginId, logger);
- this.databaseService = databaseService;
+ public AbstractDbTxOperation(IOseeDatabaseService databaseService, String operationName, String pluginId) {
+ this(databaseService, operationName, pluginId, NullOperationLogger.getSingleton());
}
- public AbstractDbTxOperation(IOseeDatabaseService databaseService, String operationName, String pluginId) {
- super(operationName, pluginId);
+ public AbstractDbTxOperation(IOseeDatabaseService databaseService, String operationName, String pluginId, OperationLogger logger) {
+ super(operationName, pluginId, logger);
this.databaseService = databaseService;
}
@@ -57,7 +57,6 @@ public abstract class AbstractDbTxOperation extends AbstractOperation {
private final IProgressMonitor monitor;
private Transaction(IProgressMonitor monitor) {
- super();
this.monitor = monitor;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionTest.java
index 61a5b42..eb15ef7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionTest.java
@@ -66,7 +66,7 @@ public class PurgeTransactionTest {
}
private void init() throws Exception {
- branch = BranchManager.getBranch(DemoSawBuilds.SAW_Bld_2.getName());
+ branch = BranchManager.getBranch(DemoSawBuilds.SAW_Bld_2);
preCreateCount = new HashMap<String, Integer>();
preModifyCount = new HashMap<String, Integer>();
postModifyPurgeCount = new HashMap<String, Integer>();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
index f829f03..27c68a1 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
@@ -71,7 +71,7 @@ public abstract class GeneralBranchHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
List<Branch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
- return branches.size() > 0 && AccessControlManager.isOseeAdmin();
+ return !branches.isEmpty() && AccessControlManager.isOseeAdmin();
}
private String buildDialogMessage(List<Branch> selectedBranches, String actionDesc) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
index 67bfa1f..b53b160 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
@@ -189,10 +189,6 @@ public class XBranchWidget extends GenericXWidget {
"Branch Manager");
}
- public void loadTable() {
- refresh();
- }
-
public ArrayList<Branch> getSelectedBranches() {
ArrayList<Branch> items = new ArrayList<Branch>();
if (branchXViewer == null || branchXViewer.getSelection().isEmpty()) {
@@ -254,9 +250,6 @@ public class XBranchWidget extends GenericXWidget {
return AHTML.simplePage("Unhandled");
}
- /**
- * @return Returns the xViewer.
- */
public BranchXViewer getXViewer() {
return branchXViewer;
}