JBoss Tools SVN: r11178 - branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-24 14:37:48 -0400 (Fri, 24 Oct 2008)
New Revision: 11178
Modified:
branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2990
Modified: branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-10-24 18:36:42 UTC (rev 11177)
+++ branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-10-24 18:37:48 UTC (rev 11178)
@@ -339,7 +339,8 @@
Attr attr = element.getAttributeNode(attributeName);
try {
- URI uri = new URI(attr.getValue());
+ //System.out.println(attr.getValue().replace(oldChar, newChar));
+ URI uri = new URI(attr.getValue().replace('\\', '/'));
if (!uri.isAbsolute()) {
// corrected path
attr.setValue(Constants.FILE_PREFIX + initFile.getParent()
16 years, 2 months
JBoss Tools SVN: r11177 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-24 14:36:42 -0400 (Fri, 24 Oct 2008)
New Revision: 11177
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
Log:
Fixing errors in the org.jboss.tools.seam.ui.test tests
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-10-24 18:33:31 UTC (rev 11176)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-10-24 18:36:42 UTC (rev 11177)
@@ -12,11 +12,13 @@
import java.io.File;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
public class Seam20EARNewOperationTest extends Seam12EARNewOperationTest {
@@ -65,4 +67,11 @@
return seam2FacetVersion;
}
+ @Override
+ protected IDataModel createSeamDataModel(String deployType) {
+ IDataModel model = super.createSeamDataModel(deployType);
+ model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+ return model;
+ }
+
}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-10-24 18:33:31 UTC (rev 11176)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-10-24 18:36:42 UTC (rev 11177)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -22,6 +23,7 @@
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.wizard.IParameter;
public class Seam20WARNewOperationTest extends Seam12WARNewOperationTest {
@@ -96,4 +98,11 @@
seamProjectWebContentFolder.toString() + "/" +
seamPageName + ".xhtml");
}
+
+ @Override
+ protected IDataModel createSeamDataModel(String deployType) {
+ IDataModel model = super.createSeamDataModel(deployType);
+ model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+ return model;
+ }
}
\ No newline at end of file
16 years, 2 months
JBoss Tools SVN: r11176 - branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-24 14:33:31 -0400 (Fri, 24 Oct 2008)
New Revision: 11176
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
Log:
Fixing errors in the org.jboss.tools.seam.ui.test tests
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-10-24 18:23:23 UTC (rev 11175)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-10-24 18:33:31 UTC (rev 11176)
@@ -12,11 +12,13 @@
import java.io.File;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
public class Seam20EARNewOperationTest extends Seam12EARNewOperationTest {
@@ -65,4 +67,11 @@
return seam2FacetVersion;
}
+ @Override
+ protected IDataModel createSeamDataModel(String deployType) {
+ IDataModel model = super.createSeamDataModel(deployType);
+ model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+ return model;
+ }
+
}
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-10-24 18:23:23 UTC (rev 11175)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-10-24 18:33:31 UTC (rev 11176)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -22,6 +23,7 @@
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.wizard.IParameter;
public class Seam20WARNewOperationTest extends Seam12WARNewOperationTest {
@@ -96,4 +98,11 @@
seamProjectWebContentFolder.toString() + "/" +
seamPageName + ".xhtml");
}
+
+ @Override
+ protected IDataModel createSeamDataModel(String deployType) {
+ IDataModel model = super.createSeamDataModel(deployType);
+ model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+ return model;
+ }
}
\ No newline at end of file
16 years, 2 months
JBoss Tools SVN: r11175 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-24 14:23:23 -0400 (Fri, 24 Oct 2008)
New Revision: 11175
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2990
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-10-24 17:34:34 UTC (rev 11174)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-10-24 18:23:23 UTC (rev 11175)
@@ -339,7 +339,7 @@
Attr attr = element.getAttributeNode(attributeName);
try {
- URI uri = new URI(attr.getValue());
+ URI uri = new URI(attr.getValue().replace('\\', '/'));
if (!uri.isAbsolute()) {
// corrected path
attr.setValue(Constants.FILE_PREFIX + initFile.getParent()
16 years, 2 months
JBoss Tools SVN: r11174 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-24 13:34:34 -0400 (Fri, 24 Oct 2008)
New Revision: 11174
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
menu item enable - bugfix
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 2008-10-24 17:34:10 UTC (rev 11173)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 17:34:34 UTC (rev 11174)
@@ -39,6 +39,7 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
@@ -166,7 +167,7 @@
return res;
}
- private void updateSelectedItems(ISelection sel) {
+ synchronized private void updateSelectedItems(ISelection sel) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
if (sel instanceof TextSelection) {
String fullyQualifiedName = ""; //$NON-NLS-1$
@@ -315,7 +316,12 @@
}
synchronized public void setSelection(ISelection selection) {
+ if ((selection instanceof StructuredSelection) && selection.isEmpty()) {
+ // just miss this selection
+ return;
+ }
this.selection = selection;
+ //System.out.println("Blah! " + selection); //$NON-NLS-1$
}
}
16 years, 2 months
JBoss Tools SVN: r11173 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-24 13:34:10 -0400 (Fri, 24 Oct 2008)
New Revision: 11173
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
menu item enable - bugfix
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 16:47:44 UTC (rev 11172)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 17:34:10 UTC (rev 11173)
@@ -39,6 +39,7 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
@@ -166,7 +167,7 @@
return res;
}
- private void updateSelectedItems(ISelection sel) {
+ synchronized private void updateSelectedItems(ISelection sel) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
if (sel instanceof TextSelection) {
String fullyQualifiedName = ""; //$NON-NLS-1$
@@ -315,7 +316,12 @@
}
synchronized public void setSelection(ISelection selection) {
+ if ((selection instanceof StructuredSelection) && selection.isEmpty()) {
+ // just miss this selection
+ return;
+ }
this.selection = selection;
+ //System.out.println("Blah! " + selection); //$NON-NLS-1$
}
}
16 years, 2 months
JBoss Tools SVN: r11172 - 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: 2008-10-24 12:47:44 -0400 (Fri, 24 Oct 2008)
New Revision: 11172
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/Utils.java
Log:
JBIDE-2987
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 2008-10-24 16:46:09 UTC (rev 11171)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2008-10-24 16:47:44 UTC (rev 11172)
@@ -42,15 +42,15 @@
}
public void selectionChanged(IAction action, ISelection selection) {
- actor.updateSelectedItems(selection);
+ actor.setSelection(selection);
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
@@ -67,7 +67,7 @@
}
public boolean isEnabled() {
- return (actor.getSelectedSize() > 0);
+ return (actor.getSelectedSourceSize() > 0);
}
public boolean isHandled() {
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 2008-10-24 16:46:09 UTC (rev 11171)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2008-10-24 16:47:44 UTC (rev 11172)
@@ -70,9 +70,9 @@
}
public void selectionChanged(IAction action, ISelection selection) {
- actor.updateSelectedItems(selection);
+ actor.setSelection(selection);
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
@@ -114,10 +114,10 @@
fillMenu(m);
fRecreateMenu = false;
}
- m.setEnabled(actor.getSelectedSize() > 0);
+ m.setEnabled(actor.getSelectedSourceSize() > 0);
MenuItem[] items = m.getItems();
for (int i = 0; i < items.length; i++) {
- items[i].setEnabled(actor.getSelectedSize() > 0);
+ items[i].setEnabled(actor.getSelectedSourceSize() > 0);
}
}
public void menuHidden(MenuEvent e) {
@@ -135,7 +135,7 @@
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
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 2008-10-24 16:46:09 UTC (rev 11171)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 16:47:44 UTC (rev 11172)
@@ -46,6 +46,7 @@
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.jdt.ui.Activator;
import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AllEntitiesProcessor;
@@ -57,6 +58,7 @@
public class JPAMapToolActor {
protected static JPAMapToolActor actor = null;
+ protected ISelection selection = null;
protected Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
protected AllEntitiesInfoCollector collector = new AllEntitiesInfoCollector();
protected AllEntitiesProcessor processor = new AllEntitiesProcessor();
@@ -89,6 +91,14 @@
}
public void updateSelected() {
+ if (selection != null) {
+ updateSelectedItems(selection);
+ selection = null;
+ }
+ if (selectionCU.size() == 0) {
+ processor.modify(null, new HashMap<String, EntityInfo>(), true);
+ return;
+ }
Iterator<ICompilationUnit> it = selectionCU.iterator();
Map<IJavaProject, Set<ICompilationUnit>> mapJP_CUSet =
new HashMap<IJavaProject, Set<ICompilationUnit>>();
@@ -141,18 +151,29 @@
collector.collect(cu);
}
- public int getSelectedSize() {
- return selectionCU.size();
+ synchronized public int getSelectedSourceSize() {
+ int res = 0;
+ if (selection == null) {
+ res = selectionCU.size();
+ }
+ else if (selection instanceof TextSelection) {
+ res = 1;
+ }
+ else if (selection instanceof TreeSelection) {
+ TreeSelection treeSelection = (TreeSelection)selection;
+ res = treeSelection.size();
+ }
+ return res;
}
- synchronized public void updateSelectedItems(ISelection selection) {
+ private void updateSelectedItems(ISelection sel) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
- if (selection instanceof TextSelection) {
+ if (sel instanceof TextSelection) {
String fullyQualifiedName = ""; //$NON-NLS-1$
IDocument fDocument = null;
SynchronizableDocument sDocument = null;
org.eclipse.jdt.core.dom.CompilationUnit resultCU = null;
- Class clazz = selection.getClass();
+ Class clazz = sel.getClass();
Field fd = null;
try {
fd = clazz.getDeclaredField("fDocument"); //$NON-NLS-1$
@@ -162,7 +183,7 @@
if (fd != null) {
try {
fd.setAccessible(true);
- fDocument = (IDocument)fd.get(selection);
+ fDocument = (IDocument)fd.get(sel);
if (fDocument instanceof SynchronizableDocument) {
sDocument = (SynchronizableDocument)fDocument;
}
@@ -202,9 +223,9 @@
addCompilationUnit(cu);
}
}
- else if (selection instanceof TreeSelection) {
+ else if (sel instanceof TreeSelection) {
clearSelectionCU();
- TreeSelection treeSelection = (TreeSelection)selection;
+ TreeSelection treeSelection = (TreeSelection)sel;
Iterator it = treeSelection.iterator();
while (it.hasNext()) {
Object obj = it.next();
@@ -213,7 +234,7 @@
}
else {
//System.out.println("2 Blah! " + selection); //$NON-NLS-1$
- selection = null;
+ sel = null;
}
}
@@ -241,7 +262,8 @@
try {
pfr = javaProject.getAllPackageFragmentRoots();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (pfr != null) {
for (int i = 0; i < pfr.length; i++) {
@@ -255,7 +277,8 @@
try {
cus = packageFragment.getCompilationUnits();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (cus != null) {
for (int i = 0; i < cus.length; i++) {
@@ -270,7 +293,8 @@
try {
javaElementInfo = (JavaElementInfo)javaElement.getElementInfo();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (javaElementInfo != null) {
IJavaElement[] je = javaElementInfo.getChildren();
@@ -289,4 +313,9 @@
//System.out.println("1 Blah! " + selection); //$NON-NLS-1$
}
}
+
+ synchronized public void setSelection(ISelection selection) {
+ this.selection = selection;
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24 16:46:09 UTC (rev 11171)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24 16:47:44 UTC (rev 11172)
@@ -48,7 +48,8 @@
try {
lwType = javaProject.findType(fullyQualifiedName);
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
ICompilationUnit resCompilationUnit = null;
if (lwType != null) {
@@ -80,21 +81,25 @@
try {
javaElement = javaProject.findElement(path.makeRelative());
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
ICompilationUnit[] res = null;
- if (javaElement instanceof ICompilationUnit) {
- res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
- }
- else if (javaElement instanceof IPackageFragment) {
- try {
- res = ((IPackageFragment)javaElement).getCompilationUnits();
- } catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ if (javaElement != null) {
+ if (javaElement instanceof ICompilationUnit) {
+ res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
}
+ else if (javaElement instanceof IPackageFragment) {
+ try {
+ res = ((IPackageFragment)javaElement).getCompilationUnits();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
+ }
+ else if (javaElement instanceof IClassFile) {
+ }
}
- else if (javaElement instanceof IClassFile) {
- }
return res;
}
16 years, 2 months
JBoss Tools SVN: r11171 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-24 12:46:09 -0400 (Fri, 24 Oct 2008)
New Revision: 11171
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
Log:
JBIDE-2987
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24 16:36:18 UTC (rev 11170)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24 16:46:09 UTC (rev 11171)
@@ -48,7 +48,8 @@
try {
lwType = javaProject.findType(fullyQualifiedName);
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
ICompilationUnit resCompilationUnit = null;
if (lwType != null) {
@@ -80,21 +81,25 @@
try {
javaElement = javaProject.findElement(path.makeRelative());
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
ICompilationUnit[] res = null;
- if (javaElement instanceof ICompilationUnit) {
- res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
- }
- else if (javaElement instanceof IPackageFragment) {
- try {
- res = ((IPackageFragment)javaElement).getCompilationUnits();
- } catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ if (javaElement != null) {
+ if (javaElement instanceof ICompilationUnit) {
+ res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
}
+ else if (javaElement instanceof IPackageFragment) {
+ try {
+ res = ((IPackageFragment)javaElement).getCompilationUnits();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
+ }
+ else if (javaElement instanceof IClassFile) {
+ }
}
- else if (javaElement instanceof IClassFile) {
- }
return res;
}
16 years, 2 months
JBoss Tools SVN: r11170 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-24 12:36:18 -0400 (Fri, 24 Oct 2008)
New Revision: 11170
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
JBIDE-2987
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2008-10-24 16:13:11 UTC (rev 11169)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2008-10-24 16:36:18 UTC (rev 11170)
@@ -42,15 +42,15 @@
}
public void selectionChanged(IAction action, ISelection selection) {
- actor.updateSelectedItems(selection);
+ actor.setSelection(selection);
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
@@ -67,7 +67,7 @@
}
public boolean isEnabled() {
- return (actor.getSelectedSize() > 0);
+ return (actor.getSelectedSourceSize() > 0);
}
public boolean isHandled() {
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2008-10-24 16:13:11 UTC (rev 11169)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2008-10-24 16:36:18 UTC (rev 11170)
@@ -70,9 +70,9 @@
}
public void selectionChanged(IAction action, ISelection selection) {
- actor.updateSelectedItems(selection);
+ actor.setSelection(selection);
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
@@ -114,10 +114,10 @@
fillMenu(m);
fRecreateMenu = false;
}
- m.setEnabled(actor.getSelectedSize() > 0);
+ m.setEnabled(actor.getSelectedSourceSize() > 0);
MenuItem[] items = m.getItems();
for (int i = 0; i < items.length; i++) {
- items[i].setEnabled(actor.getSelectedSize() > 0);
+ items[i].setEnabled(actor.getSelectedSourceSize() > 0);
}
}
public void menuHidden(MenuEvent e) {
@@ -135,7 +135,7 @@
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
if (action != null) {
- action.setEnabled(actor.getSelectedSize() > 0);
+ action.setEnabled(actor.getSelectedSourceSize() > 0);
}
}
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 16:13:11 UTC (rev 11169)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-24 16:36:18 UTC (rev 11170)
@@ -46,6 +46,7 @@
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.jdt.ui.Activator;
import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AllEntitiesProcessor;
@@ -57,6 +58,7 @@
public class JPAMapToolActor {
protected static JPAMapToolActor actor = null;
+ protected ISelection selection = null;
protected Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
protected AllEntitiesInfoCollector collector = new AllEntitiesInfoCollector();
protected AllEntitiesProcessor processor = new AllEntitiesProcessor();
@@ -89,6 +91,14 @@
}
public void updateSelected() {
+ if (selection != null) {
+ updateSelectedItems(selection);
+ selection = null;
+ }
+ if (selectionCU.size() == 0) {
+ processor.modify(null, new HashMap<String, EntityInfo>(), true);
+ return;
+ }
Iterator<ICompilationUnit> it = selectionCU.iterator();
Map<IJavaProject, Set<ICompilationUnit>> mapJP_CUSet =
new HashMap<IJavaProject, Set<ICompilationUnit>>();
@@ -141,18 +151,29 @@
collector.collect(cu);
}
- public int getSelectedSize() {
- return selectionCU.size();
+ synchronized public int getSelectedSourceSize() {
+ int res = 0;
+ if (selection == null) {
+ res = selectionCU.size();
+ }
+ else if (selection instanceof TextSelection) {
+ res = 1;
+ }
+ else if (selection instanceof TreeSelection) {
+ TreeSelection treeSelection = (TreeSelection)selection;
+ res = treeSelection.size();
+ }
+ return res;
}
- synchronized public void updateSelectedItems(ISelection selection) {
+ private void updateSelectedItems(ISelection sel) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
- if (selection instanceof TextSelection) {
+ if (sel instanceof TextSelection) {
String fullyQualifiedName = ""; //$NON-NLS-1$
IDocument fDocument = null;
SynchronizableDocument sDocument = null;
org.eclipse.jdt.core.dom.CompilationUnit resultCU = null;
- Class clazz = selection.getClass();
+ Class clazz = sel.getClass();
Field fd = null;
try {
fd = clazz.getDeclaredField("fDocument"); //$NON-NLS-1$
@@ -162,7 +183,7 @@
if (fd != null) {
try {
fd.setAccessible(true);
- fDocument = (IDocument)fd.get(selection);
+ fDocument = (IDocument)fd.get(sel);
if (fDocument instanceof SynchronizableDocument) {
sDocument = (SynchronizableDocument)fDocument;
}
@@ -202,9 +223,9 @@
addCompilationUnit(cu);
}
}
- else if (selection instanceof TreeSelection) {
+ else if (sel instanceof TreeSelection) {
clearSelectionCU();
- TreeSelection treeSelection = (TreeSelection)selection;
+ TreeSelection treeSelection = (TreeSelection)sel;
Iterator it = treeSelection.iterator();
while (it.hasNext()) {
Object obj = it.next();
@@ -213,7 +234,7 @@
}
else {
//System.out.println("2 Blah! " + selection); //$NON-NLS-1$
- selection = null;
+ sel = null;
}
}
@@ -241,7 +262,8 @@
try {
pfr = javaProject.getAllPackageFragmentRoots();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (pfr != null) {
for (int i = 0; i < pfr.length; i++) {
@@ -255,7 +277,8 @@
try {
cus = packageFragment.getCompilationUnits();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (cus != null) {
for (int i = 0; i < cus.length; i++) {
@@ -270,7 +293,8 @@
try {
javaElementInfo = (JavaElementInfo)javaElement.getElementInfo();
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
if (javaElementInfo != null) {
IJavaElement[] je = javaElementInfo.getChildren();
@@ -289,4 +313,9 @@
//System.out.println("1 Blah! " + selection); //$NON-NLS-1$
}
}
+
+ synchronized public void setSelection(ISelection selection) {
+ this.selection = selection;
+ }
+
}
16 years, 2 months
JBoss Tools SVN: r11169 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-24 12:13:11 -0400 (Fri, 24 Oct 2008)
New Revision: 11169
Modified:
workspace/examples/projectExamples.xml
Log:
JBIDE-2986 Exception is occurred while adding Seam booking example - EAR into workspace
Modified: workspace/examples/projectExamples.xml
===================================================================
--- workspace/examples/projectExamples.xml 2008-10-24 16:07:19 UTC (rev 11168)
+++ workspace/examples/projectExamples.xml 2008-10-24 16:13:11 UTC (rev 11169)
@@ -3,8 +3,7 @@
<category>Seam</category>
<name>dvdstore</name>
<shortDescription>Seam DVD Store Example - WAR</shortDescription>
- <description>This example demonstrates the use of Seam with jBPM pageflow and business process management.
-It requires the dvdstore-ear and dvdstore-ejb projects.
+ <description>This example demonstrates the use of Seam with jBPM pageflow and business process management. It requires the dvdstore-ear and dvdstore-ejb projects.
</description>
<size>962000</size>
<url>
@@ -16,8 +15,7 @@
<category>Seam</category>
<name>dvdstore-ejb</name>
<shortDescription>Seam DVD Store Example - EJB</shortDescription>
- <description>This example demonstrates the use of Seam with jBPM pageflow and business process management.
-It requires the dvdstore and dvdstore-ear projects.
+ <description>This example demonstrates the use of Seam with jBPM pageflow and business process management. It requires the dvdstore and dvdstore-ear projects.
</description>
<size>589000</size>
<url>
@@ -29,8 +27,7 @@
<category>Seam</category>
<name>dvdstore-ear</name>
<shortDescription>Seam DVD Store Example - EAR</shortDescription>
- <description>This example demonstrates the use of Seam with jBPM pageflow and business process management.
-It requires the dvdstore and dvdstore-ejb projects.
+ <description>This example demonstrates the use of Seam with jBPM pageflow and business process management. It requires the dvdstore and dvdstore-ejb projects.
</description>
<size>5700000</size>
<url>
@@ -75,7 +72,7 @@
<description>This example demonstrates the use of Seam in a Java EE 5 environment.
Transaction and persistence context management is handled by the EJB container.
This example can also run in Tomcat with JBoss Embedded.
-It requires the booking and booking-ejb projects.
+It requires the booking-ejb and booking-ejb projects.
</description>
<size>4700000</size>
<url>
16 years, 2 months