JBoss Tools SVN: r6695 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-05 11:01:28 -0500 (Wed, 05 Mar 2008)
New Revision: 6695
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-03-05 15:34:42 UTC (rev 6694)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-03-05 16:01:28 UTC (rev 6695)
@@ -22,7 +22,6 @@
import org.apache.tools.ant.util.FileUtils;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.AbstractOperation;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -39,7 +38,6 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
@@ -93,10 +91,6 @@
String entityFolder = getEntityBeanPackageName(seamFacetPrefs, params);
String testFolder = getTestCasesPackageName(seamFacetPrefs, params);
- IVirtualComponent com = ComponentCore.createComponent(project);
- IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
- IContainer webRootContainer = webRootFolder.getUnderlyingFolder();
-
vars.put(IParameter.SEAM_PROJECT_INSTANCE,project);
vars.put(IParameter.JBOSS_SEAM_HOME, SeamRuntimeManager.getInstance().getRuntimeForProject(project).getHomeDir());
vars.put(IParameter.SEAM_PROJECT_LOCATION_PATH,project.getLocation().toFile().toString());
16 years, 9 months
JBoss Tools SVN: r6694 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-05 10:34:42 -0500 (Wed, 05 Mar 2008)
New Revision: 6694
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java 2008-03-05 15:21:14 UTC (rev 6693)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java 2008-03-05 15:34:42 UTC (rev 6694)
@@ -10,37 +10,29 @@
******************************************************************************/
package org.jboss.tools.seam.core;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
/**
* Helper class that collects related J2EE projects for
- * a given 'seed' project.
+ * a given WAR project.
*
- * If seed project is EAR, it's referenced projects are used to fill
- * lists with WAR and EJB projects.
- *
- * If seed project is referenced by a EAR project (the first occurrence is taken),
- * that EAR is used as seed project.
- *
- * If seed project is WAR or EJB not referenced by any EAR project,
- * field 'ear' remains null, and only lists 'wars' and 'ejbs' are available.
- *
- * Also this class provides helper methods to obtain root folders
- * for involved EAR, WAR and EJB projects.
- *
* @author Viacheslav Kabanovich
*/
public class SeamProjectsSet {
@@ -58,37 +50,41 @@
return new SeamProjectsSet(project);
}
- public SeamProjectsSet(IProject project) {
-
- IScopeContext projectScope = new ProjectScope(project);
+ public SeamProjectsSet(IProject warProject) {
+ IScopeContext projectScope = new ProjectScope(warProject);
prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
-
- war = project;
-
- String earName = prefs.get(
- ISeamFacetDataModelProperties.SEAM_EAR_PROJECT,project.getName()+"-ear"); //$NON-NLS-1$
- if(earName!=null && !"".equals(earName.trim())) { //$NON-NLS-1$
- ear = (IProject)project.getWorkspace().getRoot().findMember(earName);
+
+ war = warProject;
+
+ if(prefs!=null) {
+ String earName = prefs.get(
+ ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, warProject.getName()+"-ear"); //$NON-NLS-1$
+ if(earName!=null && !"".equals(earName.trim())) { //$NON-NLS-1$
+ ear = (IProject)warProject.getWorkspace().getRoot().findMember(earName);
+ }
+ String ejbName = prefs.get(
+ ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, warProject.getName()+"-ejb"); //$NON-NLS-1$
+ if(ejbName!=null && !"".equals(ejbName.trim())) { //$NON-NLS-1$
+ ejb = (IProject)warProject.getWorkspace().getRoot().findMember(ejbName);
+ }
+ String testName = prefs.get(
+ ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, warProject.getName()+"test"); //$NON-NLS-1$
+ if(testName!=null && !"".equals(testName)) { //$NON-NLS-1$
+ test = (IProject)warProject.getWorkspace().getRoot().findMember(testName);
+ }
}
- String ejbName = prefs.get(
- ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,project.getName()+"-ejb"); //$NON-NLS-1$
- if(ejbName!=null && !"".equals(ejbName.trim())) { //$NON-NLS-1$
- ejb = (IProject)project.getWorkspace().getRoot().findMember(ejbName);
- }
- String testName = prefs.get(
- ISeamFacetDataModelProperties.SEAM_TEST_PROJECT,project.getName()+"test"); //$NON-NLS-1$
- if(testName!=null && !"".equals(testName)) { //$NON-NLS-1$
- test = (IProject)project.getWorkspace().getRoot().findMember(testName);
- }
}
-
+
public boolean isWarConfiguration() {
+ if(prefs==null) {
+ return false;
+ }
return prefs.get(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
ISeamFacetDataModelProperties.DEPLOY_AS_WAR)
.equals(ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
}
-
+
/**
* Returns list of WAR projects.
* @return
@@ -96,7 +92,7 @@
public IProject getWarProject() {
return war;
}
-
+
/**
* Returns EAR project or null, if WAR project is not used by EAR.
* @return
@@ -104,7 +100,7 @@
public IProject getEarProject() {
return ear;
}
-
+
/**
* Returns list of EJB projects.
* @return
@@ -112,7 +108,7 @@
public IProject getEjbProject() {
return ejb;
}
-
+
/**
*
* @return
@@ -120,63 +116,89 @@
public IProject getTestProject() {
return test;
}
-
+
/**
*
* @return the action folder (this folder is not guaranteed to exist!)
*/
public IFolder getActionFolder() {
- if(isWarConfiguration()) {
- return findWebSrcFolderByLastSegment("action",war);
- } else {
- IVirtualComponent com = ComponentCore.createComponent(ejb);
- IVirtualFolder ejbRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
- return (IFolder)ejbRootFolder.getUnderlyingFolder();
+ if(prefs==null) {
+ return getSourceFolder();
}
-
+
+ String folderPath = prefs.get(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, null);
+ return (IFolder)ResourcesPlugin.getWorkspace().getRoot().findMember(folderPath);
}
-
+
/**
*
- * @return the model folder if exists, otherwise null
+ * @return the model folder if exists (this folder is not guaranteed to exist!)
*/
- public IFolder getModelFolder() {
- if(isWarConfiguration()) {
- return findWebSrcFolderByLastSegment("model",war);
- } else {
- IVirtualComponent com = ComponentCore.createComponent(ejb);
- IVirtualFolder ejbRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
- return (IFolder)ejbRootFolder.getUnderlyingFolder();
- }
+ public IFolder getModelFolder() {
+ if(prefs==null) {
+ return getSourceFolder();
+ }
+
+ String folderPath = prefs.get(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, null);
+ return (IFolder)ResourcesPlugin.getWorkspace().getRoot().findMember(folderPath);
}
-
+
+ private IFolder getSourceFolder() {
+ IFolder webSrcFolder = findWebSrcFolder();
+ if(webSrcFolder!=null) {
+ return webSrcFolder;
+ }
+ IJavaProject javaProject = EclipseResourceUtil.getJavaProject(war);
+ try {
+ IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
+ for (int i = 0; i < roots.length; i++) {
+ if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE && roots[i].isOpen()) {
+ return (IFolder)roots[i].getResource();
+ }
+ }
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ return (IFolder)javaProject.getResource();
+ }
+
/**
- * Returns source roots for first found EJB project.
+ * Returns web contents folder.
* @return
*/
public IFolder getViewsFolder() {
- IVirtualComponent com = ComponentCore.createComponent(war);
- IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
- return (IFolder)webRootFolder.getUnderlyingFolder();
+ if(prefs==null) {
+ IVirtualComponent com = ComponentCore.createComponent(war);
+ if(com!=null) {
+ IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
+ if(webRootFolder!=null) {
+ return (IFolder)webRootFolder.getUnderlyingFolder();
+ }
+ }
+ return null;
+ }
+
+ String folderPath = prefs.get(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER, null);
+ return (IFolder)ResourcesPlugin.getWorkspace().getRoot().findMember(folderPath);
}
-
+
/**
- * Returns source roots for first found EJB project.
+ * Returns source folder for test cases.
* @return
*/
public IFolder getTestsFolder() {
- IResource testRes = test.findMember("test-src"); //$NON-NLS-1$
- IFolder testFolder = null;
- if(testRes instanceof IFolder) {
- testFolder = (IFolder)testRes;
+ if(prefs==null) {
+ return getSourceFolder();
}
- return testFolder;
+
+ String folderPath = prefs.get(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, null);
+ return (IFolder)ResourcesPlugin.getWorkspace().getRoot().findMember(folderPath);
}
-
+
public String getEntityPackage(){
return prefs.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "entity"); //$NON-NLS-1$
}
-
+
public void refreshLocal(IProgressMonitor monitor) throws CoreException {
if(ejb!=null) {
ejb.refreshLocal(IResource.DEPTH_INFINITE, monitor);
@@ -188,17 +210,12 @@
war.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
}
-
- private static final IFolder findWebSrcFolderByLastSegment(String lastSegment, IProject project) {
- IVirtualComponent component = ComponentCore.createComponent(project);
+
+ private IFolder findWebSrcFolder() {
+ IVirtualComponent component = ComponentCore.createComponent(war);
if(component!=null) {
IVirtualFolder vFolder = component.getRootFolder().getFolder("WEB-INF/classes");
- IContainer[] folders = vFolder.getUnderlyingFolders();
- for (IContainer container : folders) {
- if(lastSegment.equals(container.getFullPath().lastSegment())) {
- return (IFolder)container;
- }
- }
+ return (IFolder)vFolder.getUnderlyingFolder();
}
return null;
}
16 years, 9 months
JBoss Tools SVN: r6693 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-03-05 10:21:14 -0500 (Wed, 05 Mar 2008)
New Revision: 6693
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
Log:
imports
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2008-03-05 15:02:12 UTC (rev 6692)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2008-03-05 15:21:14 UTC (rev 6693)
@@ -41,8 +41,6 @@
import org.jboss.ide.eclipse.archives.core.model.internal.ArchiveImpl;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.XercesXsMarshaller;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
import org.xml.sax.SAXException;
16 years, 9 months
JBoss Tools SVN: r6692 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-05 10:02:12 -0500 (Wed, 05 Mar 2008)
New Revision: 6692
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322 Parameter seam.project.web.root.folder was added to settings.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-03-05 14:21:17 UTC (rev 6691)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-03-05 15:02:12 UTC (rev 6692)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core.project.facet;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.CoreException;
@@ -25,6 +27,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -139,6 +142,12 @@
model.getProperty(SEAM_TEST_PROJECT)==null?
"":model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IVirtualFolder rootFolder = component.getRootFolder();
+ IContainer webRootFolder = rootFolder.getFolder(new Path("/")).getUnderlyingFolder(); //$NON-NLS-1$
+ String webRootFolderPath = webRootFolder.getFullPath().toString();
+ prefs.put(WEB_CONTENTS_FOLDER, webRootFolderPath);
+
if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
prefs.put(SEAM_EJB_PROJECT,
model.getProperty(SEAM_EJB_PROJECT)==null?
@@ -152,8 +161,7 @@
prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcPath);
prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcPath);
} else {
- IVirtualComponent component = ComponentCore.createComponent(project);
- IPath srcRootFolder = component.getRootFolder().getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
+ IPath srcRootFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.append("model").toString());
prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.append("action").toString());
16 years, 9 months
JBoss Tools SVN: r6691 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-05 09:21:17 -0500 (Wed, 05 Mar 2008)
New Revision: 6691
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1667
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-03-05 13:27:11 UTC (rev 6690)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-03-05 14:21:17 UTC (rev 6691)
@@ -82,12 +82,14 @@
}
protected void updateExecButton(){
- if (getSourceViewer() != null ){
+ /*if (getSourceViewer() != null ){
execAction.setEnabled(getConsoleConfigurationName().trim().length() != 0
&& getSourceViewer().getDocument().get().trim().length() > 0);
} else {
execAction.setEnabled(false);
- }
+ }*/
+ execAction.setEnabled(getQueryString().trim().length() > 0
+ && getConsoleConfigurationName().length() != 0);
}
public void showEditorInput(IEditorInput editorInput) {
16 years, 9 months
JBoss Tools SVN: r6690 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-05 08:27:11 -0500 (Wed, 05 Mar 2008)
New Revision: 6690
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
Log:
JBIDE-1847 Duplicate method declaration removed.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2008-03-05 13:13:03 UTC (rev 6689)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2008-03-05 13:27:11 UTC (rev 6690)
@@ -180,39 +180,6 @@
return null;
}
- private int getPosition(StyledText t, int x, int y) {
- try {
- Point pp = t.toControl(x, y);
- x = pp.x;
- y = pp.y;
- int lineIndex =
- (t.getTopPixel() + y) / t.getLineHeight();
- if (lineIndex >= t.getLineCount()) {
- return t.getCharCount();
- } else {
- int c = 0;
- try {
- c =
- t.getOffsetAtLocation(
- new Point(x, y));
- if (c < 0)
- c = 0;
- } catch (Exception ex) {
- c =
- t.getOffsetAtLine(lineIndex + 1)
- - (t.getLineDelimiter() == null
- ? 0
- : t
- .getLineDelimiter()
- .length());
- }
- return c;
- }
- } catch (Exception e) {
- return 0;
- }
- }
-
public void dragEnter(DropTargetEvent event) {
try {
getFreeCaretControl(
@@ -652,30 +619,34 @@
private int getPosition(int x, int y) {
ISourceViewer v = getSourceViewer();
if(v == null) return 0;
- StyledText t = v.getTextWidget();
- if(t == null || t.isDisposed()) return 0;
- Point pp = t.toControl(x, y);
- x = pp.x;
- y = pp.y;
- int lineIndex = (t.getTopPixel() + y) / t.getLineHeight();
- if (lineIndex >= t.getLineCount()) {
- return t.getCharCount();
- } else {
- int c = 0;
- try {
- c = t.getOffsetAtLocation(new Point(x, y));
- if(c < 0) c = 0;
- } catch (IllegalArgumentException ex) {
- if(lineIndex + 1 >= t.getLineCount()) {
- return t.getCharCount();
- }
- c = t.getOffsetAtLine(lineIndex + 1) -
- (t.getLineDelimiter() == null ? 0 : t.getLineDelimiter().length());
- }
- return c;
- }
+ return getPosition(v.getTextWidget(), x, y);
}
+ private int getPosition(StyledText t, int x, int y) {
+ if(t == null || t.isDisposed()) return 0;
+ Point pp = t.toControl(x, y);
+ x = pp.x;
+ y = pp.y;
+ int lineIndex = (t.getTopPixel() + y) / t.getLineHeight();
+ if (lineIndex >= t.getLineCount()) {
+ return t.getCharCount();
+ } else {
+ int c = 0;
+ try {
+ c = t.getOffsetAtLocation(new Point(x, y));
+ if (c < 0) c = 0;
+ } catch (IllegalArgumentException ex) {
+ if (lineIndex + 1 >= t.getLineCount()) {
+ return t.getCharCount();
+ }
+ c = t.getOffsetAtLine(lineIndex + 1)
+ - (t.getLineDelimiter() == null
+ ? 0 : t.getLineDelimiter().length());
+ }
+ return c;
+ }
+ }
+
private DocumentListenerRegistry documentListenerRegistry;
protected DocumentListenerRegistry getDocumentListenerRegister() {
16 years, 9 months
JBoss Tools SVN: r6689 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-05 08:13:03 -0500 (Wed, 05 Mar 2008)
New Revision: 6689
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
Log:
JBIDE-1847
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2008-03-05 10:25:31 UTC (rev 6688)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2008-03-05 13:13:03 UTC (rev 6689)
@@ -63,7 +63,9 @@
import org.w3c.dom.Text;
import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.model.XModelBuffer;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelTransferBuffer;
import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.text.xml.ui.FreeCaretStyledText;
@@ -620,8 +622,15 @@
}
public void runDropCommand(final String flavor, final String data) {
+ XModelBuffer b = XModelTransferBuffer.getInstance().getBuffer();
+ final XModelObject o = b == null ? null : b.source();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
+ if(o != null && !XModelTransferBuffer.getInstance().isEnabled()) {
+ XModelTransferBuffer.getInstance().enable();
+ XModelTransferBuffer.getInstance().getBuffer().addSource(o);
+ }
+ try {
DropCommandFactory.getInstance()
.getDropCommand(flavor, EmptyTagProposalFactory.getInstance())
.execute(
@@ -632,7 +641,10 @@
getSourceViewer(),
getSelectionProvider()
)
- );
+ );
+ } finally {
+ XModelTransferBuffer.getInstance().disable();
+ }
}
});
}
@@ -653,7 +665,10 @@
try {
c = t.getOffsetAtLocation(new Point(x, y));
if(c < 0) c = 0;
- } catch (Exception ex) {
+ } catch (IllegalArgumentException ex) {
+ if(lineIndex + 1 >= t.getLineCount()) {
+ return t.getCharCount();
+ }
c = t.getOffsetAtLine(lineIndex + 1) -
(t.getLineDelimiter() == null ? 0 : t.getLineDelimiter().length());
}
16 years, 9 months
JBoss Tools SVN: r6688 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-05 05:25:31 -0500 (Wed, 05 Mar 2008)
New Revision: 6688
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-03-05 09:43:42 UTC (rev 6687)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-03-05 10:25:31 UTC (rev 6688)
@@ -33,7 +33,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.wst.common.componentcore.ComponentCore;
@@ -59,8 +58,7 @@
public static String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
public static String TEST_WAR_PROFILE = "test-war"; //$NON-NLS-1$
public static String TEST_EAR_PROFILE = "test"; //$NON-NLS-1$
-
-
+
public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar")
@@ -87,7 +85,7 @@
.include("stringtemplate.*\\.jar") //$NON-NLS-1$
.include("mvel14.jar") //$NON-NLS-1$
.include("jboss-el.jar"); //$NON-NLS-1$
-
+
// test/*.jar are duplicated here since the filtering seem to be assymetric when matching
public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
.include("testng\\.jar") //$NON-NLS-1$
@@ -104,7 +102,7 @@
.include("core.jar") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
.include("richfaces-impl\\.jar") //$NON-NLS-1$
.include("richfaces-ui\\.jar") //$NON-NLS-1$
@@ -117,8 +115,7 @@
.include("jboss-seam-remoting\\.jar") //$NON-NLS-1$
.include("jboss-seam-ui\\.jar") //$NON-NLS-1$
.include("jsf-facelets\\.jar"); //$NON-NLS-1$
-
-
+
public static AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new AntCopyUtils.FileSet()
.include("antlr-runtime.jar") //$NON-NLS-1$
.include("drools-compiler.*\\.jar") //$NON-NLS-1$
@@ -133,7 +130,7 @@
.include("META-INF/application\\.xml") //$NON-NLS-1$
.include("META-INF/jboss-app\\.xml"); //$NON-NLS-1$
*/
-
+
public static AntCopyUtils.FileSet VIEW_FILESET = new AntCopyUtils.FileSet()
.include("home\\.xhtml") //$NON-NLS-1$
.include("error\\.xhtml") //$NON-NLS-1$
@@ -149,14 +146,14 @@
.exclude(".*/.*\\.ftl") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
public static AntCopyUtils.FileSet CVS_SVN = new AntCopyUtils.FileSet()
.include(".*") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude("CVS") //$NON-NLS-1$
.exclude(".*\\.svn") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
public static AntCopyUtils.FileSet JBOOS_WAR_WEBINF_SET = new AntCopyUtils.FileSet()
.include("WEB-INF") //$NON-NLS-1$
.include("WEB-INF/web\\.xml") //$NON-NLS-1$
@@ -164,24 +161,24 @@
.include("WEB-INF/jboss-web\\.xml") //$NON-NLS-1$
.include("WEB-INF/faces-config\\.xml") //$NON-NLS-1$
.include("WEB-INF/componets\\.xml"); //$NON-NLS-1$
-
+
public static AntCopyUtils.FileSet JBOOS_WAR_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("security\\.drl") //$NON-NLS-1$
.include("seam\\.properties") //$NON-NLS-1$
.include("messages_en\\.properties"); //$NON-NLS-1$
-
+
public static AntCopyUtils.FileSet JBOOS_EJB_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("seam\\.properties")
.exclude(".*/WEB-INF"); //$NON-NLS-1$
-
+
public static String DROOLS_LIB_SEAM_RELATED_PATH = "lib"; //$NON-NLS-1$
-
+
public static String SEAM_LIB_RELATED_PATH = "lib"; //$NON-NLS-1$
-
+
public static String WEB_LIBRARIES_RELATED_PATH = "WEB-INF/lib"; //$NON-NLS-1$
-
+
public void doExecute(final IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
final IDataModel model = (IDataModel)config;
@@ -191,10 +188,10 @@
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
final IVirtualFolder srcRootFolder = component.getRootFolder().getFolder(new Path("/WEB-INF/classes")); //$NON-NLS-1$
IContainer webRootFolder = webRootVirtFolder.getUnderlyingFolder();
-
+
model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, project.getName()+"-test"); //$NON-NLS-1$
-
+
Boolean dbExists = (Boolean)model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
Boolean dbRecreate = (Boolean)model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
if(!dbExists && !dbRecreate) {
@@ -204,11 +201,9 @@
} else if(dbRecreate) {
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO,"create-drop"); //$NON-NLS-1$
}
-
-
+
final String consoleName = isWarConfiguration(model)?project.getName():project.getName()+"-ejb";
-
-
+
final File webContentFolder = webRootFolder.getLocation().toFile();
final File webInfFolder = new File(webContentFolder,"WEB-INF"); //$NON-NLS-1$
final File webInfClasses = new File(webInfFolder,"classes"); //$NON-NLS-1$
@@ -220,29 +215,29 @@
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
-
+
final File seamHomeFolder = new File(seamHomePath);
final File seamLibFolder = new File(seamHomePath,SEAM_LIB_RELATED_PATH);
final File seamGenResFolder = new File(seamHomePath,"seam-gen/resources"); //$NON-NLS-1$
final File seamGenResMetainfFolder = new File(seamGenResFolder,"META-INF"); //$NON-NLS-1$
-
+
final File droolsLibFolder = new File(seamHomePath,DROOLS_LIB_SEAM_RELATED_PATH);
final File seamGenHomeFolder = new File(seamHomePath,"seam-gen"); //$NON-NLS-1$
final File seamGenViewSource = new File(seamGenHomeFolder,"view"); //$NON-NLS-1$
final File dataSourceDsFile = new File(seamGenResFolder, "datasource-ds.xml"); //$NON-NLS-1$
final File componentsFile = new File(seamGenResFolder,"WEB-INF/components"+(isWarConfiguration(model)?"-war":"")+".xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
+
final File hibernateConsoleLaunchFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.launch"); //$NON-NLS-1$
final File hibernateConsolePropsFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
//final File hibernateConsolePref = new File(seamGenHomeFolder, "hibernatetools/.settings/org.hibernate.eclipse.console.prefs"); //$NON-NLS-1$
final File persistenceFile = new File(seamGenResFolder,"META-INF/persistence-" + (isWarConfiguration(model)?DEV_WAR_PROFILE:DEV_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
//final File applicationFile = new File(seamGenResFolder,"META-INF/application.xml"); //$NON-NLS-1$
final FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
final FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
final FilterSet filtersFilterSet = SeamFacetFilterSetFactory.createFiltersFilterSet(model);
-
+
// ****************************************************************
// Copy view folder from seam-gen installation to WebContent folder
// ****************************************************************
@@ -251,52 +246,49 @@
viewFilterSetCollection.addFilterSet(jdbcFilterSet);
viewFilterSetCollection.addFilterSet(projectFilterSet);
viewFilterSetCollection.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
-
+
AntCopyUtils.copyFilesAndFolders(
seamGenViewSource,
webContentFolder,
new AntCopyUtils.FileSetFileFilter(viewFileSet),
viewFilterSetCollection,
true);
-
+
// *******************************************************************
// Copy manifest and configuration resources the same way as view
// *******************************************************************
AntCopyUtils.FileSet webInfSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEBINF_SET).dir(seamGenResFolder);
-
+
AntCopyUtils.copyFileToFile(
componentsFile,
new File(webInfFolder,"components.xml"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);
-
+
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder,webContentFolder,new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, true);
-
final FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
hibernateDialectFilterSet.addFilterSet(projectFilterSet);
hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
-
-
+
createTestProject(model,project,selectedRuntime);
// ********************************************************************************************
// Handle WAR/EAR configurations
// ********************************************************************************************
if(isWarConfiguration(model)) {
-
AntCopyUtils.FileSet webInfClassesSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder,srcFolder,new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
-
+
createComponentsProperties(srcFolder, isWarConfiguration(model)?"":project.getName()+"-ear", false); //$NON-NLS-1$ //$NON-NLS-2$
-
+
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
new File(project.getLocation().toFile(),".settings"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);*/
-
+
// In case of WAR configuration
AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamLibFolder)));
@@ -307,17 +299,17 @@
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), srcFolder, true); //$NON-NLS-1$
final IContainer source = srcRootFolder.getUnderlyingFolder();
-
+
IPath actionSrcPath = new Path(source.getFullPath().removeFirstSegments(1)+"/action"); //$NON-NLS-1$
IPath modelSrcPath = new Path(source.getFullPath().removeFirstSegments(1)+"/model"); //$NON-NLS-1$
srcRootFolder.delete(IVirtualFolder.FORCE, monitor);
WtpUtils.createSourceFolder(project, actionSrcPath, source.getFullPath().removeFirstSegments(1), new Path(webRootFolder.getLocation().lastSegment()+"/WEB-INF/dev")); //$NON-NLS-1$
WtpUtils.createSourceFolder(project, modelSrcPath, source.getFullPath().removeFirstSegments(1), null);
-
+
srcRootFolder.createLink(actionSrcPath, 0, null);
srcRootFolder.createLink(modelSrcPath, 0, null);
-
+
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
new File(project.getLocation().toFile(),source.getFullPath().removeFirstSegments(1)+"/action/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -325,7 +317,7 @@
// Needed to make sure /dev is picked up by test, so need seam.properties.
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), new File(project.getLocation().toFile(),source.getFullPath().lastSegment()+"/action"), true); //$NON-NLS-1$
-
+
AntCopyUtils.copyFileToFile(
persistenceFile,
new File(srcFolder,"META-INF/persistence.xml"), //$NON-NLS-1$
@@ -336,30 +328,29 @@
dataSourceDsFile,
new File(resources,project.getName()+"-ds.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
// to fix seam2 tests for war deployment
// File srcModelMetaInf = new File(project.getLocation().append(modelSrcPath).toFile(),"META-INF");
// AntCopyUtils.copyFileToFile(
// dataSourceDsFile,
// new File(srcModelMetaInf,project.getName()+"-ds.xml"), //$NON-NLS-1$
// viewFilterSetCollection, true);
-
+
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
new File(project.getLocation().toFile(),project.getName()+".launch"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
project.getLocation().toFile(),
hibernateDialectFilterSet, true);
-
- WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
+ WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
} else {
model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, project.getName()+"-ejb"); //$NON-NLS-1$
model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName()+"-ear"); //$NON-NLS-1$
-
+
// In case of EAR configuration
AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamLibFolder)));
@@ -370,7 +361,7 @@
File ejb = new File(project.getLocation().removeLastSegments(1).toFile(),model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ejb"); //$NON-NLS-1$
ear.mkdir();
ejb.mkdir();
-
+
try {
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", project.getName()); //$NON-NLS-1$
@@ -382,12 +373,12 @@
filterSet.addFilter("driverJar",""); //$NON-NLS-1$ //$NON-NLS-2$
}
AntCopyUtils.FileSet excludeCvsSvn = new AntCopyUtils.FileSet(CVS_SVN).dir(seamGenResFolder);
-
+
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb"), //$NON-NLS-1$
ejb, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
-
+
// *******************************************************************************************
// Copy sources to ejb project in case of EAR configuration
// *******************************************************************************************
@@ -399,14 +390,13 @@
persistenceFile,
new File(ejb,"ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
createComponentsProperties(new File(ejb,"ejbModule"), isWarConfiguration(model)?"":project.getName()+"-ear", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+
AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder,new File(ejb,"ejbModule"),new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
-
-
+
// ********************************************************************************************
// Copy seam project indicator
// ********************************************************************************************
@@ -416,41 +406,41 @@
// Copy security.drl to source folder
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"security.drl"), new File(ejb,"ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
-
+
File resources = new File(ear,"resources");
AntCopyUtils.copyFileToFile(
dataSourceDsFile,
new File(resources,project.getName()+"-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
viewFilterSetCollection, true);
-
+
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder,"META-INF/ejb-jar.xml"), //$NON-NLS-1$
new File(ejb,"ejbModule/META-INF/"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
new File(ejb,".settings"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);*/
-
+
FilterSet ejbFilterSet = new FilterSet();
ejbFilterSet.addFilter("projectName",ejb.getName()); //$NON-NLS-1$
-
+
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
new File(ejb,ejb.getName()+".launch"), //$NON-NLS-1$
new FilterSetCollection(ejbFilterSet), true);
-
+
AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
ejb,
hibernateDialectFilterSet, true);
-
+
File earContentsFolder = new File(ear,"EarContent"); //$NON-NLS-1$
FilterSet earFilterSet = new FilterSet();
earFilterSet.addFilter("projectName",ear.getName()+".ear"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder,"META-INF/jboss-app.xml"), //$NON-NLS-1$
new File(earContentsFolder,"META-INF"), //$NON-NLS-1$
@@ -461,54 +451,47 @@
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ear-seam2"), //$NON-NLS-1$
ear, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
-
+
// Fill ear contents
AntCopyUtils.copyFiles(seamHomeFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
AntCopyUtils.copyFiles(droolsLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
AntCopyUtils.copyFiles(seamGenResFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
-
- try {
-
- File[] earJars = earContentsFolder.listFiles(new FilenameFilter() {
- /* (non-Javadoc)
- * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
- */
- public boolean accept(File dir, String name) {
- if(name.lastIndexOf(".jar")>0) return true; //$NON-NLS-1$
- return false;
- }
- });
- String earJarsStr = ""; //$NON-NLS-1$
- for (File file : earJars) {
- earJarsStr +=" " + file.getName() +" \n"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ File[] earJars = earContentsFolder.listFiles(new FilenameFilter() {
+ /* (non-Javadoc)
+ * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
+ */
+ public boolean accept(File dir, String name) {
+ if(name.lastIndexOf(".jar")>0) return true; //$NON-NLS-1$
+ return false;
}
-
- FilterSetCollection manifestFilterCol = new FilterSetCollection(projectFilterSet);
- FilterSet manifestFilter = new FilterSet();
- manifestFilter.addFilter("earLibs",earJarsStr); //$NON-NLS-1$
- manifestFilterCol.addFilterSet(manifestFilter);
- AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"war/META-INF/MANIFEST.MF"), webMetaInf, manifestFilterCol, true); //$NON-NLS-1$
- File ejbMetaInf = new File(ejb,"ejbModule/META-INF"); //$NON-NLS-1$
- AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb/ejbModule/META-INF/MANIFEST.MF"), ejbMetaInf, manifestFilterCol, true); //$NON-NLS-1$
- } catch (IOException e) {
- SeamCorePlugin.getPluginLog().logError(e);
+ });
+ String earJarsStr = ""; //$NON-NLS-1$
+ for (File file : earJars) {
+ earJarsStr +=" " + file.getName() +" \n"; //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
+ FilterSetCollection manifestFilterCol = new FilterSetCollection(projectFilterSet);
+ FilterSet manifestFilter = new FilterSet();
+ manifestFilter.addFilter("earLibs",earJarsStr); //$NON-NLS-1$
+ manifestFilterCol.addFilterSet(manifestFilter);
+ AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"war/META-INF/MANIFEST.MF"), webMetaInf, manifestFilterCol, true); //$NON-NLS-1$
+ File ejbMetaInf = new File(ejb,"ejbModule/META-INF"); //$NON-NLS-1$
+ AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb/ejbModule/META-INF/MANIFEST.MF"), ejbMetaInf, manifestFilterCol, true); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
ClasspathHelper.addClasspathEntries(project, fv);
-
+
createSeamProjectPreferenes(project, model);
-
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
toggleHibernateOnProject(project, consoleName);
-
+
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
String wsPath = project.getLocation().removeLastSegments(1)
.toFile().getAbsoluteFile().getPath();
@@ -516,81 +499,34 @@
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
if(!isWarConfiguration(model)) {
-
IProject ejbProjectToBeImported = wsRoot.getProject(project.getName()+"-ejb");
ResourcesUtils.importExistingProject(ejbProjectToBeImported, wsPath+"/"+project.getName()+"-ejb", project.getName()+"-ejb");
toggleHibernateOnProject(ejbProjectToBeImported, consoleName);
IProjectFacet sf = ProjectFacetsManager.getProjectFacet("jst.ejb");
IProjectFacetVersion pfv = ProjectFacetsManager.create(ejbProjectToBeImported).getInstalledVersion(sf);
ClasspathHelper.addClasspathEntries(ejbProjectToBeImported, pfv);
-
+
IProject earProjectToBeImported = wsRoot.getProject(project.getName()+"-ear");
ResourcesUtils.importExistingProject(earProjectToBeImported, wsPath+"/"+project.getName()+"-ear", project.getName()+"-ear");
}
-
+
IProject testProjectToBeImported = wsRoot.getProject(project.getName()+"-test");
ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath+"/"+project.getName()+"-test", project.getName()+"-test");
toggleHibernateOnProject(testProjectToBeImported, consoleName);
-
}
-
-
public static boolean isWarConfiguration(IDataModel model) {
return "war".equals(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS)); //$NON-NLS-1$
}
-
-
- /**
- * @param project
- * @param model
- */
- protected void createSeamProjectPreferenes(final IProject project,
- final IDataModel model) {
- IScopeContext projectScope = new ProjectScope(project);
- IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
-
- prefs.put(JBOSS_AS_DEPLOY_AS, model.getProperty(JBOSS_AS_DEPLOY_AS).toString());
-
- prefs.put(SEAM_RUNTIME_NAME, model.getProperty(SEAM_RUNTIME_NAME).toString());
-
- prefs.put(SEAM_CONNECTION_PROFILE,model.getProperty(SEAM_CONNECTION_PROFILE).toString());
-
- prefs.put(SESSION_BEAN_PACKAGE_NAME, model.getProperty(SESSION_BEAN_PACKAGE_NAME).toString());
-
- prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
-
- prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
-
- prefs.put(SEAM_TEST_PROJECT,
- model.getProperty(SEAM_TEST_PROJECT)==null?
- "":model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
-
- if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
- prefs.put(SEAM_EJB_PROJECT,
- model.getProperty(SEAM_EJB_PROJECT)==null?
- "":model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
-
- prefs.put(SEAM_EAR_PROJECT,
- model.getProperty(SEAM_EAR_PROJECT)==null?
- "":model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
- }
-
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
- }
private void createTestProject(IDataModel model, IProject seamWebProject, SeamRuntime seamRuntime) {
String projectName = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME).toString();
File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(),projectName+"-test"); //$NON-NLS-1$
testProjectDir.mkdir();
-
+
IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
-
+
File testLibDir = new File(testProjectDir,"lib"); //$NON-NLS-1$
File embededEjbDir = new File(testProjectDir,"bootstrap"); //$NON-NLS-1$
File testSrcDir = new File(testProjectDir,"test-src"); //$NON-NLS-1$
@@ -607,17 +543,17 @@
FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
// TODO: why are these filters not shared!?
filterSet.addConfiguredFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
-
+
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
-
+
AntCopyUtils.FileSet includeLibs
= new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
.dir(new File(seamRuntime.getHomeDir(),"lib")); //$NON-NLS-1$
AntCopyUtils.FileSet secondSetincludeLibs
= new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
.dir(new File(seamRuntime.getHomeDir(),"lib/test")); //$NON-NLS-1$
-
+
File[] firstlibs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
File[] secondLibs = secondSetincludeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(secondSetincludeLibs));
Set<String> allLibs = new HashSet<String>(); // HACK: needed to be unique because some jboss-*.jars are duplicated
@@ -627,13 +563,13 @@
for(File f : secondLibs) {
allLibs.add(f.getName());
}
-
+
StringBuffer testLibraries = new StringBuffer();
-
+
for (String file : allLibs) {
testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
StringBuffer requiredProjects = new StringBuffer();
requiredProjects.append(
"\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -652,13 +588,13 @@
}
AntCopyUtils.FileSet excludeCvsSvn
= new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
-
+
AntCopyUtils.copyFilesAndFolders(
testTemplateDir,
testProjectDir,
new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
-
+
excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(),"bootstrap")); //$NON-NLS-1$
AntCopyUtils.copyFilesAndFolders(
new File(seamRuntime.getHomeDir(),"bootstrap"), //$NON-NLS-1$
@@ -669,11 +605,11 @@
// persistenceFile,
// new File(testProjectDir,"test-src/META-INF/persistence.xml"), //$NON-NLS-1$
// new FilterSetCollection(filterSet), true);
-
+
FilterSetCollection f = new FilterSetCollection();
f.addFilterSet(filterSet);
f.addFilterSet(jdbcFilterSet);
-
+
AntCopyUtils.copyFileToFile(
dataSourceFile,
new File(testProjectDir,"test-src/META-INF/"+seamWebProject.getName()+"-test-ds.xml"), //$NON-NLS-1$
@@ -714,12 +650,12 @@
SeamCorePlugin.getPluginLog().logError(e);
}
}
-
+
public static boolean toggleHibernateOnProject(IProject project, String defaultConsoleName) {
IScopeContext scope = new ProjectScope(project);
-
+
Preferences node = scope.getNode("org.hibernate.eclipse.console");
-
+
if(node!=null) {
node.putBoolean("hibernate3.enabled", true );
node.put("default.configuration", defaultConsoleName );
@@ -732,7 +668,7 @@
} else {
return false;
}
-
+
try {
addProjectNature(project, "org.hibernate.eclipse.console.hibernateNature", new NullProgressMonitor() );
return true;
@@ -740,9 +676,8 @@
SeamCorePlugin.getDefault().logError("Could not activate Hibernate nature on project " + project.getName(), ce);
return false;
}
-
}
-
+
/**
* Add the given project nature to the given project (if it isn't already added).
* @return true if nature where added, false if not
@@ -752,7 +687,7 @@
if (monitor != null && monitor.isCanceled() ) {
throw new OperationCanceledException();
}
-
+
if (!project.hasNature(nature) ) {
IProjectDescription description = project.getDescription();
String[] prevNatures= description.getNatureIds();
@@ -767,4 +702,4 @@
return false;
}
}
-}
+}
\ No newline at end of file
16 years, 9 months
JBoss Tools SVN: r6687 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-05 04:43:42 -0500 (Wed, 05 Mar 2008)
New Revision: 6687
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1845
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-03-05 08:04:32 UTC (rev 6686)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-03-05 09:43:42 UTC (rev 6687)
@@ -35,6 +35,7 @@
import org.eclipse.core.filebuffers.manipulation.FileBufferOperationRunner;
import org.eclipse.core.filebuffers.manipulation.MultiTextEditWithProgress;
import org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -42,6 +43,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
@@ -208,9 +210,23 @@
return null;
- final String outputPathRes = PathHelper.getLocationAsStringPath(attributes.getOutputPath());
+ String outputPathRes = PathHelper.getLocationAsStringPath(attributes.getOutputPath());
+ if (outputPathRes == null){
+ IFolder folder = (IFolder) PathHelper.getOrCreateFolder(attributes.getOutputPath());
+ if (folder != null) {
+ outputPathRes = PathHelper.getLocation( folder ).toOSString();
+ }
+ }
+ final String fOutputPathRes = outputPathRes;
- final String templatePath = PathHelper.getLocationAsStringPath(attributes.getTemplatePath());
+ String templatePath = PathHelper.getLocationAsStringPath(attributes.getTemplatePath());
+ if (templatePath == null){
+ IFolder folder = (IFolder) PathHelper.getOrCreateFolder(attributes.getTemplatePath());
+ if (folder != null) {
+ templatePath = PathHelper.getLocation( folder ).toOSString();
+ }
+ }
+ final String fTemplatePath = templatePath;
ConsoleConfiguration cc = KnownConfigurations.getInstance().find(attributes.getConsoleConfigurationName());
if (attributes.isReverseEngineer()) {
@@ -230,8 +246,8 @@
String templatePaths = null;
- if(StringHelper.isNotEmpty(templatePath)) {
- templatePaths = templatePath;
+ if(StringHelper.isNotEmpty(fTemplatePath)) {
+ templatePaths = fTemplatePath;
}
// Global properties
@@ -248,7 +264,7 @@
Exporter exporter;
try {
- exporter = exporterFactories[i].createConfiguredExporter(cfg, outputPathRes, templatePaths, globalProperties, outputDirectories, artifactCollector);
+ exporter = exporterFactories[i].createConfiguredExporter(cfg, fOutputPathRes, templatePaths, globalProperties, outputDirectories, artifactCollector);
} catch (CoreException e) {
throw new HibernateConsoleRuntimeException("Error while setting up " + exporterFactories[i].getExporterDefinition(), e);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java 2008-03-05 08:04:32 UTC (rev 6686)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java 2008-03-05 09:43:42 UTC (rev 6687)
@@ -3,17 +3,38 @@
import java.io.File;
import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin;
// TODO: move to internal.
public class PathHelper {
+
+ public static IFolder getOrCreateFolder(IPath path) {
+ if (path == null) return null;
+ IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
+ if (!folder.exists()) {
+ try {
+ folder.create(false, true,
+ new NullProgressMonitor());
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ return folder;
+ }
+
+ public static IFolder getOrCreateFolder(String path) {
+ if (path == null) return null;
+ return getOrCreateFolder(pathOrNull(path));
+ }
public static String getLocationAsStringPath(String path) {
if(path==null) return null;
16 years, 9 months
JBoss Tools SVN: r6686 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model: impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-05 03:04:32 -0500 (Wed, 05 Mar 2008)
New Revision: 6686
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1846
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-03-05 08:04:27 UTC (rev 6685)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-03-05 08:04:32 UTC (rev 6686)
@@ -47,6 +47,7 @@
ITypeMapping[] getTypeMappings();
ITypeMapping createTypeMapping();
+ void removeAllTypeMappings();
void removeTypeMapping(ITypeMapping item);
void addTypeMapping(ITypeMapping typeMapping);
void moveTypeMappingDown(ITypeMapping item);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-03-05 08:04:27 UTC (rev 6685)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-03-05 08:04:32 UTC (rev 6686)
@@ -134,9 +134,15 @@
public void moveTypeMappingUp(ITypeMapping item) {
move(item, -1, typeMappings, TYPEMAPPING_STRUCTURE);
}
+
+ public void removeAllTypeMappings() {
+ typeMappings.clear();
+ firePropertyChange(TYPEMAPPING_STRUCTURE, null, null);
+ }
public void removeTypeMapping(ITypeMapping item) {
- typeMappings.remove(item);
+ typeMappings.remove(item);
+ firePropertyChange(TYPEMAPPING_STRUCTURE, item, null);
}
public IRevEngTable[] getTables() {
16 years, 9 months