JBoss Tools SVN: r14571 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-07 10:47:44 -0400 (Tue, 07 Apr 2009)
New Revision: 14571
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
Log:
JBIDE-3833
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2009-04-07 13:04:36 UTC (rev 14570)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2009-04-07 14:47:44 UTC (rev 14571)
@@ -77,7 +77,7 @@
continue;
}
if(s.equals("\n")) {
- if(state < 2) sb.append(s); else lineEnd.append(s);
+ if(state != 2) sb.append(s); else lineEnd.append(s);
if(state == 0) {
state = 1;
} else if(state == 2) {
@@ -228,13 +228,21 @@
StringTokenizer st = new StringTokenizer(dirtyvalue, INTERNAL_SEPARATOR, true);
StringBuffer cv = new StringBuffer();
StringBuffer dv = new StringBuffer();
+ String rightWhites = "";
while(st.hasMoreTokens()) {
String t = st.nextToken();
if(t.equals(INTERNAL_SEPARATOR)) {
- dv.append("\\\n");
+ if(rightWhites.length() > 0) {
+ cv.append(rightWhites);
+ rightWhites = "";
+ }
+ dv.append("\\");
} else {
if(t.startsWith("#")) cv.append("\\");
- cv.append(t.trim());
+ String app = t.trim();
+ int off = t.indexOf(app);
+ rightWhites = t.substring(off + app.length());
+ cv.append(app);
dv.append(t);
}
}
15 years, 8 months
JBoss Tools SVN: r14570 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/xpl.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:04:36 -0400 (Tue, 07 Apr 2009)
New Revision: 14570
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/xpl/EditorTestHelper.java
Log:
JBIDE-4137
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/xpl/EditorTestHelper.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/xpl/EditorTestHelper.java 2009-04-07 13:03:43 UTC (rev 14569)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/xpl/EditorTestHelper.java 2009-04-07 13:04:36 UTC (rev 14570)
@@ -18,9 +18,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.widgets.Display;
@@ -162,7 +160,7 @@
// Join Building
Logger.global.entering("EditorTestHelper", "joinBackgroundActivities"); //$NON-NLS-1$ //$NON-NLS-2$
Logger.global.finer("join builder"); //$NON-NLS-1$
- boolean interrupted= true;
+ //boolean interrupted= true;
// TODO: Block was commented to fix correlation with ValidationJob that leads
// to conflict with ValidationFramework.join() and test hanging forever
// while (interrupted) {
@@ -189,7 +187,7 @@
};
boolean quiet= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : Long.MAX_VALUE, intervalTime);
runEventQueue(minTime);
- Logger.global.exiting("EditorTestHelper", "joinJobs", new Boolean(quiet)); //$NON-NLS-1$ //$NON-NLS-2$
+ Logger.global.exiting("EditorTestHelper", "joinJobs", Boolean.valueOf(quiet)); //$NON-NLS-1$ //$NON-NLS-2$
return quiet;
}
@@ -202,7 +200,7 @@
}
public static boolean allJobsQuiet() {
- IJobManager jobManager= Platform.getJobManager();
+ IJobManager jobManager= Job.getJobManager();
Job[] jobs= jobManager.find(null);
for (int i= 0; i < jobs.length; i++) {
Job job= jobs[i];
15 years, 8 months
JBoss Tools SVN: r14569 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view: views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:03:43 -0400 (Tue, 07 Apr 2009)
New Revision: 14569
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07 13:02:51 UTC (rev 14568)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07 13:03:43 UTC (rev 14569)
@@ -49,7 +49,7 @@
public ViewPlugin() {
super();
- plugin = this;
+ setPlugin(this);
try {
resourceBundle = ResourceBundle.getBundle(PLUGIN_ID + ".EditPluginResources"); //$NON-NLS-1$
@@ -75,11 +75,15 @@
public void stop(BundleContext context) throws Exception {
super.stop(context);
+ setPlugin(null);
}
public static ViewPlugin getDefault() {
return plugin;
}
+ private static void setPlugin(ViewPlugin plugin) {
+ ViewPlugin.plugin = plugin;
+ }
public static String getResourceString(String key) {
ResourceBundle bundle = ViewPlugin.getDefault().getResourceBundle();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07 13:02:51 UTC (rev 14568)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07 13:03:43 UTC (rev 14569)
@@ -78,4 +78,8 @@
public boolean equals(Object obj) {
return (obj instanceof ObjectEditorInput && ((ObjectEditorInput)obj).fObject == fObject);
}
+
+ public int hashCode() {
+ return fObject.hashCode();
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07 13:02:51 UTC (rev 14568)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07 13:03:43 UTC (rev 14569)
@@ -52,7 +52,7 @@
if (type != null) {
name.append(" ["); //$NON-NLS-1$
- name.append(type != null ? type.toUpperCase() : ""); //$NON-NLS-1$
+ name.append(type.toUpperCase());
name.append(column.isNullable() ? " Nullable" : ""); //$NON-NLS-1$ //$NON-NLS-2$
name.append(HibernateUtils.getTable(column) != null
&& HibernateUtils.isPrimaryKey(column) ? " PK" : ""); //$NON-NLS-1$ //$NON-NLS-2$
15 years, 8 months
JBoss Tools SVN: r14568 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors: popup and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:02:51 -0400 (Tue, 07 Apr 2009)
New Revision: 14568
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/popup/PopupMenuProvider.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2009-04-07 13:02:19 UTC (rev 14567)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2009-04-07 13:02:51 UTC (rev 14568)
@@ -113,7 +113,7 @@
VisualEditorPlugin.getDefault().logError(e);
}
if (xy.length > 2)
- if ((new Boolean(xy[2])).booleanValue())
+ if ((Boolean.valueOf(xy[2])))
ormShape.refreshHiden();
tempPoint = ormShape.getLocation().y
+ getChildrenFigurePreferredHeight(ormShape) + 20;
@@ -404,7 +404,7 @@
}
- class LinkInfo implements ILinkInfo {
+ static class LinkInfo implements ILinkInfo {
Connection link = null;
String id = null;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/popup/PopupMenuProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/popup/PopupMenuProvider.java 2009-04-07 13:02:19 UTC (rev 14567)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/popup/PopupMenuProvider.java 2009-04-07 13:02:51 UTC (rev 14568)
@@ -108,7 +108,7 @@
item.setEnabled(enabled);
}
- class AL implements SelectionListener {
+ static class AL implements SelectionListener {
IAction action;
public AL(IAction action) {
15 years, 8 months
JBoss Tools SVN: r14567 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:02:19 -0400 (Tue, 07 Apr 2009)
New Revision: 14567
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ComponentShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Connection.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ComponentShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ComponentShape.java 2009-04-07 13:00:58 UTC (rev 14566)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ComponentShape.java 2009-04-07 13:02:19 UTC (rev 14567)
@@ -52,6 +52,6 @@
}
- firePropertyChange(SET_CHILDS_HIDEN, null, new Boolean(!refHide));
+ firePropertyChange(SET_CHILDS_HIDEN, null, Boolean.valueOf(!refHide));
}
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Connection.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Connection.java 2009-04-07 13:00:58 UTC (rev 14566)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Connection.java 2009-04-07 13:02:19 UTC (rev 14567)
@@ -61,7 +61,7 @@
if(needHide == 1)
return;
}
- firePropertyChange(SET_HIDEN, null, new Boolean(hiden));
+ firePropertyChange(SET_HIDEN, null, Boolean.valueOf(hiden));
}
public boolean isHiden() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java 2009-04-07 13:00:58 UTC (rev 14566)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java 2009-04-07 13:02:19 UTC (rev 14567)
@@ -45,7 +45,7 @@
}
}
}
- firePropertyChange(SHOW_REFERENCES, null, new Boolean(refHide));
+ firePropertyChange(SHOW_REFERENCES, null, Boolean.valueOf(refHide));
}
protected boolean getHide() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2009-04-07 13:00:58 UTC (rev 14566)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2009-04-07 13:02:19 UTC (rev 14567)
@@ -210,11 +210,11 @@
public void refreshHiden() {
hiden = !hiden;
setElementHidden(this, hiden);
- firePropertyChange(SET_HIDEN, null, new Boolean(hiden));
+ firePropertyChange(SET_HIDEN, null, Boolean.valueOf(hiden));
}
public void refreshReference(){
- firePropertyChange(SET_HIDEN, null, new Boolean(hiden));
+ firePropertyChange(SET_HIDEN, null, Boolean.valueOf(hiden));
}
private void setElementHidden(ModelElement element, boolean hidden){
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java 2009-04-07 13:00:58 UTC (rev 14566)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java 2009-04-07 13:02:19 UTC (rev 14567)
@@ -192,7 +192,7 @@
StringBuffer name = new StringBuffer();
if (type != null) {
- name.append(type != null ? type.toUpperCase() : ""); //$NON-NLS-1$
+ name.append(type.toUpperCase());
name.append(HibernateUtils.getTable(column) != null
&& HibernateUtils.isPrimaryKey(column) ? " PK" : ""); //$NON-NLS-1$ //$NON-NLS-2$
name.append(HibernateUtils.getTable(column) != null
15 years, 8 months
JBoss Tools SVN: r14566 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:00:58 -0400 (Tue, 07 Apr 2009)
New Revision: 14566
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java 2009-04-07 13:00:21 UTC (rev 14565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java 2009-04-07 13:00:58 UTC (rev 14566)
@@ -28,7 +28,7 @@
private static VisualEditorPlugin plugin;
public VisualEditorPlugin() {
- plugin = this;
+ setPlugin(this);
}
public void start(BundleContext context) throws Exception {
@@ -37,13 +37,17 @@
public void stop(BundleContext context) throws Exception {
super.stop(context);
- plugin = null;
+ setPlugin(null);
}
public static VisualEditorPlugin getDefault() {
return plugin;
}
+ private static void setPlugin(VisualEditorPlugin plugin) {
+ VisualEditorPlugin.plugin = plugin;
+ }
+
public static ImageDescriptor getImageDescriptor(String path) {
return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
}
15 years, 8 months
JBoss Tools SVN: r14565 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui: xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 09:00:21 -0400 (Tue, 07 Apr 2009)
New Revision: 14565
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/HibernateJptUIPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/AddRemoveListPane.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/PersistenceUnitClassesComposite.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/HibernateJptUIPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/HibernateJptUIPlugin.java 2009-04-07 12:59:51 UTC (rev 14564)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/HibernateJptUIPlugin.java 2009-04-07 13:00:21 UTC (rev 14565)
@@ -39,7 +39,7 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- plugin = this;
+ setPlugin(this);
}
/*
@@ -47,7 +47,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);
}
@@ -59,6 +59,10 @@
public static HibernateJptUIPlugin getDefault() {
return plugin;
}
+
+ private static void setPlugin(HibernateJptUIPlugin plugin) {
+ HibernateJptUIPlugin.plugin = plugin;
+ }
/**
* Log message
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/AddRemoveListPane.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/AddRemoveListPane.java 2009-04-07 12:59:51 UTC (rev 14564)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/AddRemoveListPane.java 2009-04-07 13:00:21 UTC (rev 14565)
@@ -474,7 +474,7 @@
*/
protected void initializeTable(Table table) {
- table.setData("column.width", new Integer(0));
+ table.setData("column.width", Integer.valueOf(0));
table.setHeaderVisible(false);
table.setLinesVisible(false);
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/PersistenceUnitClassesComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/PersistenceUnitClassesComposite.java 2009-04-07 12:59:51 UTC (rev 14564)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/xpl/PersistenceUnitClassesComposite.java 2009-04-07 13:00:21 UTC (rev 14565)
@@ -52,7 +52,6 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.ui.progress.IProgressService;
-import org.jboss.tools.hibernate.jpt.ui.HibernateJptUIPlugin;
import org.jboss.tools.hibernate.jpt.ui.xpl.AddRemovePane.Adapter;
/**
15 years, 8 months
JBoss Tools SVN: r14564 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:59:51 -0400 (Tue, 07 Apr 2009)
New Revision: 14564
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2009-04-07 12:59:24 UTC (rev 14563)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2009-04-07 12:59:51 UTC (rev 14564)
@@ -136,7 +136,7 @@
* mock hibernate factory, redefine some methods of base GenericJpaFactory
* to avoid unnecessary checks, which are not a subject of testing.
*/
- public class MockHibernateFactory extends HibernateFactory {
+ static public class MockHibernateFactory extends HibernateFactory {
/**
* during the testing our file has relevant content,
* so just return true without dig into the base code.
@@ -170,7 +170,7 @@
/**
* mock input stream to simulate javaFileName file reading
*/
- public class MockJavaInputStream extends InputStream {
+ public static class MockJavaInputStream extends InputStream {
protected int pointer = 0;
@@ -186,7 +186,7 @@
/**
* mock input stream to simulate .classpath file reading
*/
- public class MockClassPathInputStream extends InputStream {
+ public static class MockClassPathInputStream extends InputStream {
protected int pointer = 0;
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java 2009-04-07 12:59:24 UTC (rev 14563)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java 2009-04-07 12:59:51 UTC (rev 14564)
@@ -50,7 +50,7 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- plugin = this;
+ setPlugin(this);
}
/*
@@ -61,7 +61,7 @@
* )
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -74,6 +74,10 @@
return plugin;
}
+ private static void setPlugin(HibernateJPTuiTestPlugin plugin) {
+ HibernateJPTuiTestPlugin.plugin = plugin;
+ }
+
public File getFileInPlugin(IPath path) throws CoreException {
try {
URL installURL = new URL(getBundle().getEntry("/"), path.toString()); //$NON-NLS-1$
15 years, 8 months
JBoss Tools SVN: r14563 - trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:59:24 -0400 (Tue, 07 Apr 2009)
New Revision: 14563
Modified:
trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenPlugin.java
Log:
JBIDE-4137
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenPlugin.java
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenPlugin.java 2009-04-07 12:59:06 UTC (rev 14562)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenPlugin.java 2009-04-07 12:59:24 UTC (rev 14563)
@@ -27,7 +27,7 @@
public class SeamGenPlugin extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.seam.gen";
+ public static final String PLUGIN_ID = "org.jboss.ide.seam.gen"; //$NON-NLS-1$
// The shared instance
private static SeamGenPlugin plugin;
@@ -36,7 +36,7 @@
* The constructor
*/
public SeamGenPlugin() {
- plugin = this;
+ setPlugin(this);
}
/*
@@ -51,7 +51,7 @@
private void initSeamGen() {
ILaunchConfiguration config=null;
try {
- config = findLaunchConfig("seamgen");
+ config = findLaunchConfig("seamgen"); //$NON-NLS-1$
} catch (CoreException e1) {
logError("Exception occured during search in Launch Configuration list.", e1);
}
@@ -71,7 +71,7 @@
}
}
- private static final String JBOSS_AS_HOME = "../../../../jboss-eap/jboss-as";
+ private static final String JBOSS_AS_HOME = "../../../../jboss-eap/jboss-as"; //$NON-NLS-1$
static public String assumeJBossASHome() {
String pluginLocation=null;
@@ -86,7 +86,7 @@
if(p.toFile().exists()) {
return p.toOSString();
} else {
- return "";
+ return ""; //$NON-NLS-1$
}
}
@@ -113,7 +113,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);
}
@@ -126,6 +126,10 @@
return plugin;
}
+ private static void setPlugin(SeamGenPlugin plugin) {
+ SeamGenPlugin.plugin = plugin;
+ }
+
public static void log(IStatus status) {
getDefault().getLog().log(status);
15 years, 8 months
JBoss Tools SVN: r14562 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper: extractor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-07 08:59:06 -0400 (Tue, 07 Apr 2009)
New Revision: 14562
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
Log:
JBIDE-4137
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java 2009-04-07 12:58:38 UTC (rev 14561)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java 2009-04-07 12:59:06 UTC (rev 14562)
@@ -48,7 +48,7 @@
int regLength = att.getValueRegion().getTextLength();
String attValue = att.getValueRegionText();
if (org.eclipse.wst.sse.core.utils.StringUtils.isQuoted(attValue) ) {
- regOffset = ++regOffset;
+ ++regOffset;
regLength = regLength - 2;
}
hyperRegion = new Region(regOffset, regLength);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java 2009-04-07 12:58:38 UTC (rev 14561)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java 2009-04-07 12:59:06 UTC (rev 14562)
@@ -56,6 +56,18 @@
return name.compareTo( ( (HibernateTypeDescriptor)o).getName() );
}
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof HibernateTypeDescriptor)) {
+ return false;
+ }
+ HibernateTypeDescriptor htd = (HibernateTypeDescriptor) obj;
+ return this.name.equals(htd.getName());
+ }
+
+ public int hashCode() {
+ return this.name.hashCode();
+ }
+
public String toString() {
return name;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2009-04-07 12:58:38 UTC (rev 14561)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2009-04-07 12:59:06 UTC (rev 14562)
@@ -66,12 +66,11 @@
private Boolean getBoolean(String name) {
Node type = getNode().getAttributes().getNamedItem(name);
- if(type == null) {
- return null;
- } else {
- Boolean decode = Boolean.valueOf(type.getNodeValue());
- return decode;
+ Boolean decode = null;
+ if(type != null) {
+ decode = Boolean.valueOf(type.getNodeValue());
}
+ return decode;
}
public Integer getPrecision() {
15 years, 8 months