JBoss Tools SVN: r14561 - trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:58:38 -0400 (Tue, 07 Apr 2009)
New Revision: 14561
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java 2009-04-07 12:57:36 UTC (rev 14560)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java 2009-04-07 12:58:38 UTC (rev 14561)
@@ -47,7 +47,7 @@
*/
public MapperPlugin() {
super();
- plugin = this;
+ setPlugin(this);
}
/**
@@ -63,7 +63,7 @@
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
- plugin = null;
+ setPlugin(null);
resourceBundle = null;
}
@@ -73,6 +73,10 @@
public static MapperPlugin getDefault() {
return plugin;
}
+
+ private static void setPlugin(MapperPlugin plugin) {
+ MapperPlugin.plugin = plugin;
+ }
public EclipseLogger getLogger() {
return logger;
15 years, 8 months
JBoss Tools SVN: r14560 - trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:57:36 -0400 (Tue, 07 Apr 2009)
New Revision: 14560
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateJDTuiTestPlugin.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateJDTuiTestPlugin.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateJDTuiTestPlugin.java 2009-04-07 12:51:32 UTC (rev 14559)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateJDTuiTestPlugin.java 2009-04-07 12:57:36 UTC (rev 14560)
@@ -35,7 +35,7 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- plugin = this;
+ setPlugin(this);
}
/*
@@ -43,7 +43,7 @@
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -55,6 +55,10 @@
public static HibernateJDTuiTestPlugin getDefault() {
return plugin;
}
+
+ private static void setPlugin(HibernateJDTuiTestPlugin plugin) {
+ HibernateJDTuiTestPlugin.plugin = plugin;
+ }
public File getFileInPlugin(IPath path) throws CoreException {
try {
15 years, 8 months
JBoss Tools SVN: r14559 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa: common and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:51:32 -0400 (Tue, 07 Apr 2009)
New Revision: 14559
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-04-07 12:50:50 UTC (rev 14558)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-04-07 12:51:32 UTC (rev 14559)
@@ -64,7 +64,6 @@
}
public void init(IViewPart view) {
- view = null;
}
public boolean isCUSelected() {
IWorkbench workbench = Activator.getDefault().getWorkbench();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2009-04-07 12:50:50 UTC (rev 14558)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2009-04-07 12:51:32 UTC (rev 14559)
@@ -66,7 +66,6 @@
}
public void run(IAction action) {
- action = null;
}
public void selectionChanged(IAction action, ISelection selection) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-04-07 12:50:50 UTC (rev 14558)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-04-07 12:51:32 UTC (rev 14559)
@@ -69,7 +69,7 @@
/**
* instance
*/
- protected static JPAMapToolActor actor = null;
+ private static JPAMapToolActor actor = null;
/**
* selection - start point to generate annotations
* could be java file, list of files, package, project, some other?
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-04-07 12:50:50 UTC (rev 14558)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-04-07 12:51:32 UTC (rev 14559)
@@ -53,4 +53,19 @@
public int compareTo(RefEntityInfo rei) {
return fullyQualifiedName.compareTo(rei.fullyQualifiedName);
}
+
+ public boolean equals(Object obj) {
+ if (super.equals(obj)) {
+ return true;
+ }
+ if (obj == null || !(obj instanceof RefEntityInfo)) {
+ return false;
+ }
+ RefEntityInfo rei = (RefEntityInfo)obj;
+ return fullyQualifiedName.equals(rei.fullyQualifiedName);
+ }
+
+ public int hashCode() {
+ return fullyQualifiedName.hashCode();
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java 2009-04-07 12:50:50 UTC (rev 14558)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java 2009-04-07 12:51:32 UTC (rev 14559)
@@ -37,4 +37,19 @@
public int compareTo(RefFieldInfo rfi) {
return fieldId.compareTo(rfi.fieldId);
}
+
+ public boolean equals(Object obj) {
+ if (super.equals(obj)) {
+ return true;
+ }
+ if (obj == null || !(obj instanceof RefFieldInfo)) {
+ return false;
+ }
+ RefFieldInfo rfi = (RefFieldInfo)obj;
+ return fieldId.equals(rfi.fieldId);
+ }
+
+ public int hashCode() {
+ return fieldId.hashCode();
+ }
}
15 years, 8 months
JBoss Tools SVN: r14558 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:50:50 -0400 (Tue, 07 Apr 2009)
New Revision: 14558
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java 2009-04-07 12:50:28 UTC (rev 14557)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java 2009-04-07 12:50:50 UTC (rev 14558)
@@ -39,7 +39,7 @@
* The constructor
*/
public Activator() {
- plugin = this;
+ setPlugin(this);
}
public void start(BundleContext context) throws Exception {
@@ -48,7 +48,7 @@
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -61,4 +61,8 @@
return plugin;
}
+ private static void setPlugin(Activator plugin) {
+ Activator.plugin = plugin;
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java 2009-04-07 12:50:28 UTC (rev 14557)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java 2009-04-07 12:50:50 UTC (rev 14558)
@@ -41,7 +41,7 @@
* The constructor
*/
public Activator() {
- plugin = this;
+ setPlugin(this);
}
/*
@@ -57,7 +57,7 @@
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -69,5 +69,9 @@
public static Activator getDefault() {
return plugin;
}
+
+ private static void setPlugin(Activator plugin) {
+ Activator.plugin = plugin;
+ }
}
15 years, 8 months
JBoss Tools SVN: r14557 - trunk/hibernatetools/plugins/org.hibernate.eclipse.help/src/java/org/hibernate/eclipse/help.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:50:28 -0400 (Tue, 07 Apr 2009)
New Revision: 14557
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.help/src/java/org/hibernate/eclipse/help/HelpPlugin.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.help/src/java/org/hibernate/eclipse/help/HelpPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.help/src/java/org/hibernate/eclipse/help/HelpPlugin.java 2009-04-07 12:50:12 UTC (rev 14556)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.help/src/java/org/hibernate/eclipse/help/HelpPlugin.java 2009-04-07 12:50:28 UTC (rev 14557)
@@ -43,7 +43,7 @@
*/
public HelpPlugin() {
super();
- plugin = this;
+ setPlugin(this);
}
/**
@@ -58,7 +58,7 @@
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
- plugin = null;
+ setPlugin(null);
resourceBundle = null;
}
@@ -69,6 +69,10 @@
return plugin;
}
+ private static void setPlugin(HelpPlugin plugin) {
+ HelpPlugin.plugin = plugin;
+ }
+
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
15 years, 8 months
JBoss Tools SVN: r14556 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:50:12 -0400 (Tue, 07 Apr 2009)
New Revision: 14556
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTestPlugin.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/JavaFormattingTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2009-04-07 12:49:21 UTC (rev 14555)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2009-04-07 12:50:12 UTC (rev 14556)
@@ -165,6 +165,7 @@
}
QueryPage qp = consoleCfg.executeHQLQuery("from java.lang.Object"); //$NON-NLS-1$
+ assertNotNull(qp);
assertEquals(1, listener.queryCreated);
consoleCfg.closeSessionFactory();
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTestPlugin.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTestPlugin.java 2009-04-07 12:49:21 UTC (rev 14555)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTestPlugin.java 2009-04-07 12:50:12 UTC (rev 14556)
@@ -28,7 +28,7 @@
* The constructor.
*/
public HibernateConsoleTestPlugin() {
- plugin = this;
+ setPlugin(this);
}
/**
@@ -43,7 +43,7 @@
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
- plugin = null;
+ setPlugin(null);
resourceBundle = null;
}
@@ -54,6 +54,9 @@
return plugin;
}
+ private static void setPlugin(HibernateConsoleTestPlugin plugin) {
+ HibernateConsoleTestPlugin.plugin = plugin;
+ }
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/JavaFormattingTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/JavaFormattingTest.java 2009-04-07 12:49:21 UTC (rev 14555)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/JavaFormattingTest.java 2009-04-07 12:50:12 UTC (rev 14556)
@@ -51,6 +51,7 @@
edit.apply(doc);
String newcontents = doc.get();
+ assertNotNull(newcontents);
//assertEquals(newcontents,"java.lang.String str; \nSystem.out.println();");
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java 2009-04-07 12:49:21 UTC (rev 14555)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java 2009-04-07 12:50:12 UTC (rev 14556)
@@ -268,7 +268,7 @@
}
//====================================================================================
- class TestWorkingCopy implements ILaunchConfigurationWorkingCopy{
+ static class TestWorkingCopy implements ILaunchConfigurationWorkingCopy{
private TestLaunchConfig parent;
@@ -473,7 +473,7 @@
}
- class TestLaunchConfig implements ILaunchConfiguration{
+ static class TestLaunchConfig implements ILaunchConfiguration{
private Map<String, Object> attributes = new HashMap<String, Object>();
15 years, 8 months
JBoss Tools SVN: r14555 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:49:21 -0400 (Tue, 07 Apr 2009)
New Revision: 14555
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/GeneralExceptionStatusHandler.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2009-04-07 12:48:52 UTC (rev 14554)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2009-04-07 12:49:21 UTC (rev 14555)
@@ -618,7 +618,7 @@
enableEJB3annotations.addSelectionListener( fieldlistener );
}
- private class ExporterContentProvider implements IStructuredContentProvider, PropertyChangeListener {
+ static private class ExporterContentProvider implements IStructuredContentProvider, PropertyChangeListener {
private AbstractTableViewer viewer;
@@ -661,7 +661,7 @@
}
// Complete hack to get table to work with arbitrary exporters quickly.
- private class ObservableFactoryList {
+ static private class ObservableFactoryList {
List underlyingList = new ArrayList();
@@ -675,7 +675,7 @@
underlyingList.remove((ExporterFactory) data);
remove(data);
underlyingList.add(i, data);
- pcs.firePropertyChange("insertElement", new Integer(i), data); //$NON-NLS-1$
+ pcs.firePropertyChange("insertElement", Integer.valueOf(i), data); //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/GeneralExceptionStatusHandler.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/GeneralExceptionStatusHandler.java 2009-04-07 12:48:52 UTC (rev 14554)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/GeneralExceptionStatusHandler.java 2009-04-07 12:49:21 UTC (rev 14555)
@@ -34,7 +34,7 @@
final boolean[] result = new boolean[1];
HibernateConsolePlugin.getDefault().log( status );
HibernateConsolePlugin.openError(null, HibernateConsoleMessages.GeneralExceptionStatusHandler_generating_code, HibernateConsoleMessages.GeneralExceptionStatusHandler_exception_while_generating_code, status.getException(), HibernateConsolePlugin.PERFORM_SYNC_EXEC);
- return new Boolean(result[0]);
+ return Boolean.valueOf(result[0]);
}
}
15 years, 8 months
JBoss Tools SVN: r14554 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:48:52 -0400 (Tue, 07 Apr 2009)
New Revision: 14554
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLSourceViewerConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConnectionProfileCtrl.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLSourceViewerConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLSourceViewerConfiguration.java 2009-04-07 12:47:22 UTC (rev 14553)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLSourceViewerConfiguration.java 2009-04-07 12:48:52 UTC (rev 14554)
@@ -36,7 +36,6 @@
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.QueryEditor;
import org.hibernate.eclipse.hqleditor.preferences.HQLPreferenceConstants;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2009-04-07 12:47:22 UTC (rev 14553)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2009-04-07 12:48:52 UTC (rev 14554)
@@ -331,7 +331,7 @@
value.setLayoutData(vgd);
} else {
((GridData)value.getLayoutData()).horizontalSpan = span;
- ((Text)value).setText(new String());
+ ((Text)value).setText(""); //$NON-NLS-1$
}
value.getParent().layout();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConnectionProfileCtrl.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConnectionProfileCtrl.java 2009-04-07 12:47:22 UTC (rev 14553)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConnectionProfileCtrl.java 2009-04-07 12:48:52 UTC (rev 14554)
@@ -83,13 +83,17 @@
@Override
public boolean equals(Object obj) {
- if(obj==null) {
+ if (obj == null || !(obj instanceof ConnectionWrapper)) {
return false;
}
-
ConnectionWrapper cw = (ConnectionWrapper) obj;
return this.getId().equals(cw.getId());
}
+
+ @Override
+ public int hashCode() {
+ return this.getId().hashCode();
+ }
}
protected ArrayList<ModifyListener> modifyListeners = new ArrayList<ModifyListener>();
15 years, 8 months
JBoss Tools SVN: r14553 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph: layout and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:47:22 -0400 (Tue, 07 Apr 2009)
New Revision: 14553
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/figures/PropertiesFigure.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/ClusterEdgeCreator.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/DummyEdgeCreator.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/figures/PropertiesFigure.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/figures/PropertiesFigure.java 2009-04-07 12:46:52 UTC (rev 14552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/figures/PropertiesFigure.java 2009-04-07 12:47:22 UTC (rev 14553)
@@ -43,7 +43,7 @@
setOpaque( true );
}
- class PropertiesFigureBorder extends AbstractBorder {
+ static class PropertiesFigureBorder extends AbstractBorder {
public Insets getInsets(IFigure figure) {
return new Insets( 5, 3, 3, 1 );
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/ClusterEdgeCreator.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/ClusterEdgeCreator.java 2009-04-07 12:46:52 UTC (rev 14552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/ClusterEdgeCreator.java 2009-04-07 12:47:22 UTC (rev 14553)
@@ -217,7 +217,7 @@
//add the new edge to the edge list
edgeList.add(edge);
- targetNode = sourceNode;
+ //targetNode = sourceNode;
addedEdge = true;
return edge;
}
@@ -225,7 +225,7 @@
/**
* Very thin wrapper around List
*/
- private class Cluster
+ static private class Cluster
{
List set = new ArrayList();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/DummyEdgeCreator.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/DummyEdgeCreator.java 2009-04-07 12:46:52 UTC (rev 14552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/DummyEdgeCreator.java 2009-04-07 12:47:22 UTC (rev 14553)
@@ -117,7 +117,7 @@
edge.weight = 2;
edgeList.add(edge);
- targetNode = sourceNode;
+ //targetNode = sourceNode;
addedEdge = true;
return edge;
}
15 years, 8 months
JBoss Tools SVN: r14552 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-04-07 08:46:52 -0400 (Tue, 07 Apr 2009)
New Revision: 14552
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/preferences.properties
Log:
JBIDE-4044 Review unused strings as reported by "Find Broken Externalized Strings"
The Messages resource bundle is redeveloped using NLS.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java 2009-04-07 12:46:38 UTC (rev 14551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java 2009-04-07 12:46:52 UTC (rev 14552)
@@ -127,10 +127,10 @@
heightHint = convertVerticalDLUsToPixels(14 /*IDialogConstants.BUTTON_HEIGHT*/);
widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- addButtonImpl = createButton(impl, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonImpl = createButton(impl, Messages.ImplementationsPreferencesPage_Add); //$NON-NLS-1$
if (errorMessage != null) addButtonImpl.setEnabled(false);
- removeButtonImpl = createButton(impl, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonImpl = createButton(impl, Messages.ImplementationsPreferencesPage_Remove); //$NON-NLS-1$
removeButtonImpl.setEnabled(false);
// TabFolder
@@ -139,10 +139,10 @@
tabbedComposite.setLayoutData(gridDataTab);
TabItem librariesTab = new TabItem(tabbedComposite,SWT.NULL);
- librariesTab.setText(Messages.getString("ImplementationsPreferencesPage.Library.Sets")); //$NON-NLS-1$
+ librariesTab.setText(Messages.ImplementationsPreferencesPage_Library_Sets); //$NON-NLS-1$
TabItem projectTab = new TabItem(tabbedComposite,SWT.NULL);
- projectTab.setText(Messages.getString("ImplementationsPreferencesPage.Project.Templates")); //$NON-NLS-1$
+ projectTab.setText(Messages.ImplementationsPreferencesPage_Project_Templates); //$NON-NLS-1$
// listLibraries
Composite entryLibraries = new Composite(tabbedComposite, SWT.NULL);
@@ -156,10 +156,10 @@
listLibraries.setLayoutData(gridDataListLibraries);
- addButtonLibraries = createButton(entryLibraries, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonLibraries = createButton(entryLibraries, Messages.ImplementationsPreferencesPage_Add); //$NON-NLS-1$
addButtonLibraries.setEnabled(false);
- removeButtonLibraries = createButton(entryLibraries, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonLibraries = createButton(entryLibraries, Messages.ImplementationsPreferencesPage_Remove); //$NON-NLS-1$
removeButtonLibraries.setEnabled(false);
librariesTab.setControl(entryLibraries);
@@ -176,23 +176,21 @@
listProject.setLayoutData(gridDataListProject);
- addButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonProject = createButton(entryProject, Messages.ImplementationsPreferencesPage_Add); //$NON-NLS-1$
addButtonProject.setEnabled(false);
- editButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Edit")); //$NON-NLS-1$
+ editButtonProject = createButton(entryProject, Messages.ImplementationsPreferencesPage_Edit); //$NON-NLS-1$
editButtonProject.setEnabled(false);
- upButtonProject = createButton(entryProject, Messages
- .getString("ImplementationsPreferencesPage.Up")); //$NON-NLS-1$
+ upButtonProject = createButton(entryProject, Messages.ImplementationsPreferencesPage_Up); //$NON-NLS-1$
upButtonProject.setEnabled(false);
GridData d = (GridData)upButtonProject.getLayoutData();
d.verticalIndent = 5;
- downButtonProject = createButton(entryProject, Messages
- .getString("ImplementationsPreferencesPage.Down")); //$NON-NLS-1$
+ downButtonProject = createButton(entryProject, Messages.ImplementationsPreferencesPage_Down); //$NON-NLS-1$
downButtonProject.setEnabled(false);
- removeButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonProject = createButton(entryProject, Messages.ImplementationsPreferencesPage_Remove); //$NON-NLS-1$
removeButtonProject.setEnabled(false);
d = (GridData)removeButtonProject.getLayoutData();
d.verticalIndent = 5;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-04-07 12:46:38 UTC (rev 14551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-04-07 12:46:52 UTC (rev 14552)
@@ -83,7 +83,7 @@
String[] pageLabels = new String[pages == null ? 0 : pages.length];
for (int i = 0; pageLabels != null && i < pageLabels.length; i++) {
pageLabels[i] = pages[i];
- if (pages[i].equals(defaultPage)) pageLabels[i] += " " + Messages.getString("AbstractPagesPreferencePage.3");
+ if (pages[i].equals(defaultPage)) pageLabels[i] += " " + Messages.AbstractPagesPreferencePage_3;
}
return pageLabels;
}
@@ -115,14 +115,14 @@
listPages.setLayoutData(gridDataList);
addButtonPages = new Button(entryPage, SWT.PUSH);
- addButtonPages.setText(Messages.getString("AbstractPagesPreferencePage.0"));
+ addButtonPages.setText(Messages.AbstractPagesPreferencePage_0);
GridData gridDataAddButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataAddButton.widthHint = widthHint;
gridDataAddButton.heightHint=heightHint;
addButtonPages.setLayoutData(gridDataAddButton);
removeButton = new Button(entryPage, SWT.PUSH);
- removeButton.setText(Messages.getString("AbstractPagesPreferencePage.1"));
+ removeButton.setText(Messages.AbstractPagesPreferencePage_1);
GridData gridDataRemoveButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataRemoveButton.widthHint = widthHint;
gridDataRemoveButton.heightHint=heightHint;
@@ -133,7 +133,7 @@
if (isSetDefaultAllowed()) {
setDefaultButton = new Button(entryPage, SWT.PUSH);
- setDefaultButton.setText(Messages.getString("AbstractPagesPreferencePage.2"));
+ setDefaultButton.setText(Messages.AbstractPagesPreferencePage_2);
GridData gridDataSetDefaultButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataSetDefaultButton.widthHint = widthHint;
gridDataSetDefaultButton.heightHint=heightHint;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java 2009-04-07 12:46:38 UTC (rev 14551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java 2009-04-07 12:46:52 UTC (rev 14552)
@@ -76,7 +76,7 @@
listLib.setLayoutData(gridDataList);
Button addButtonLib = new Button(entryLib, SWT.PUSH);
- addButtonLib.setText(Messages.getString("LibrarySetsPreferencePage.0"));
+ addButtonLib.setText(Messages.LibrarySetsPreferencePage_0);
//addButtonLib.setText("Add");
GridData gridDataAddButton = new GridData(GridData.BEGINNING);
gridDataAddButton.widthHint = widthHint;
@@ -84,7 +84,7 @@
addButtonLib.setLayoutData(gridDataAddButton);
removeButtonLib = new Button(entryLib, SWT.PUSH);
- removeButtonLib.setText(Messages.getString("LibrarySetsPreferencePage.1"));
+ removeButtonLib.setText(Messages.LibrarySetsPreferencePage_1);
GridData gridDataRemoveButton = new GridData(GridData.BEGINNING);
gridDataRemoveButton.widthHint = widthHint;
gridDataRemoveButton.heightHint = heightHint;
@@ -93,7 +93,7 @@
removeButtonLib.setEnabled(false);
Label jarsIncludedLabel = new Label(entryLib, SWT.NONE);
- jarsIncludedLabel.setText(Messages.getString("LibrarySetsPreferencePage.jarsIncluded"));
+ jarsIncludedLabel.setText(Messages.LibrarySetsPreferencePage_jarsIncluded);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
jarsIncludedLabel.setLayoutData(data);
@@ -110,7 +110,7 @@
listLibJar.setLayoutData(gridDatalistLibJar);
addButtonLibJar = new Button(entryLib, SWT.PUSH);
- addButtonLibJar.setText(Messages.getString("LibrarySetsPreferencePage.0"));
+ addButtonLibJar.setText(Messages.LibrarySetsPreferencePage_0);
GridData gridDataAddButtonLibJar = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridDataAddButtonLibJar.widthHint = widthHint;
gridDataAddButtonLibJar.heightHint = heightHint;
@@ -118,7 +118,7 @@
addButtonLibJar.setEnabled(false);
removeButtonLibJar = new Button(entryLib, SWT.PUSH);
- removeButtonLibJar.setText(Messages.getString("LibrarySetsPreferencePage.1"));
+ removeButtonLibJar.setText(Messages.LibrarySetsPreferencePage_1);
GridData gridDataRemoveButtonLibJar = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridDataRemoveButtonLibJar.widthHint = widthHint;
gridDataRemoveButtonLibJar.heightHint = heightHint;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java 2009-04-07 12:46:38 UTC (rev 14551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java 2009-04-07 12:46:52 UTC (rev 14552)
@@ -1,22 +1,30 @@
package org.jboss.tools.jst.web.ui.internal.preferences;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-public class Messages {
+public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.ui.internal.preferences.preferences"; //$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ public static String LibrarySetsPreferencePage_0;
+ public static String LibrarySetsPreferencePage_1;
+ public static String AbstractPagesPreferencePage_0;
+ public static String AbstractPagesPreferencePage_1;
+ public static String AbstractPagesPreferencePage_2;
+ public static String AbstractPagesPreferencePage_3;
+ public static String LibrarySetsPreferencePage_jarsIncluded;
+ public static String ImplementationsPreferencesPage_Add;
+ public static String ImplementationsPreferencesPage_Edit;
+ public static String ImplementationsPreferencesPage_Remove;
+ public static String ImplementationsPreferencesPage_Up;
+ public static String ImplementationsPreferencesPage_Down;
+ public static String ImplementationsPreferencesPage_Library_Sets;
+ public static String ImplementationsPreferencesPage_Project_Templates;
private Messages() {
}
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/preferences.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/preferences.properties 2009-04-07 12:46:38 UTC (rev 14551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/preferences.properties 2009-04-07 12:46:52 UTC (rev 14552)
@@ -1,18 +1,15 @@
# PD (PREFERENCE DESCRIPTION)
-LIBRARY_SETS_PD=Here you can modify what libraries get included in the project file systems for new Struts projects. You can modify this specifically for different versions of the Servlet and Struts technologies that might be used with a project.
-LibrarySetsPreferencePage.0=Add
-LibrarySetsPreferencePage.1=Remove
-LibrarySetsPreferencePage.2=Add
-LibrarySetsPreferencePage.3=Remove
-AbstractPagesPreferencePage.0=Add
-AbstractPagesPreferencePage.1=Remove
-AbstractPagesPreferencePage.2=Set Default
-AbstractPagesPreferencePage.3= [default]
-LibrarySetsPreferencePage.jarsIncluded=Jars Included\:
-ImplementationsPreferencesPage.Add=Add
-ImplementationsPreferencesPage.Edit=Edit
-ImplementationsPreferencesPage.Remove=Remove
-ImplementationsPreferencesPage.Up=Up
-ImplementationsPreferencesPage.Down=Down
-ImplementationsPreferencesPage.Library.Sets=Library Sets
-ImplementationsPreferencesPage.Project.Templates=Project Templates
\ No newline at end of file
+LibrarySetsPreferencePage_0=Add
+LibrarySetsPreferencePage_1=Remove
+AbstractPagesPreferencePage_0=Add
+AbstractPagesPreferencePage_1=Remove
+AbstractPagesPreferencePage_2=Set Default
+AbstractPagesPreferencePage_3= [default]
+LibrarySetsPreferencePage_jarsIncluded=Jars Included\:
+ImplementationsPreferencesPage_Add=Add
+ImplementationsPreferencesPage_Edit=Edit
+ImplementationsPreferencesPage_Remove=Remove
+ImplementationsPreferencesPage_Up=Up
+ImplementationsPreferencesPage_Down=Down
+ImplementationsPreferencesPage_Library_Sets=Library Sets
+ImplementationsPreferencesPage_Project_Templates=Project Templates
\ No newline at end of file
15 years, 8 months