JBoss Tools SVN: r4083 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-09 15:38:17 -0400 (Tue, 09 Oct 2007)
New Revision: 4083
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
JBIDE-992
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-09 17:33:44 UTC (rev 4082)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-09 19:38:17 UTC (rev 4083)
@@ -24,6 +24,7 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
@@ -42,6 +43,7 @@
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerPort;
+import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.model.IURLProvider;
import org.eclipse.wst.server.core.model.ServerDelegate;
@@ -109,9 +111,29 @@
return new IModule[0];
}
- // As of now none of my modules are implementing the parent / child nonesense
- public IModule[] getRootModules(IModule module) throws CoreException {
- return new IModule[] { module };
+ public IModule[] getRootModules(IModule module) throws CoreException {
+ IStatus status = canModifyModules(new IModule[] { module }, null);
+ if (status != null && !status.isOK())
+ throw new CoreException(status);;
+ IModule[] parents = doGetParentModules(module);
+ if(parents.length>0)
+ return parents;
+ return new IModule[] { module };
+ }
+
+
+ private IModule[] doGetParentModules(IModule module) {
+ IModule[] ears = ServerUtil.getModules("jst.ear"); //$NON-NLS-1$
+ ArrayList list = new ArrayList();
+ for (int i = 0; i < ears.length; i++) {
+ IEnterpriseApplication ear = (IEnterpriseApplication)ears[i].loadAdapter(IEnterpriseApplication.class,null);
+ IModule[] childs = ear.getModules();
+ for (int j = 0; j < childs.length; j++) {
+ if(childs[j].equals(module))
+ list.add(ears[i]);
+ }
+ }
+ return (IModule[])list.toArray(new IModule[list.size()]);
}
public ServerPort[] getServerPorts() {
17 years, 3 months
JBoss Tools SVN: r4082 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-09 13:33:44 -0400 (Tue, 09 Oct 2007)
New Revision: 4082
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1016 Duplicate seam folders generated when select path not to workspace
No more duplicates.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-10-09 17:33:36 UTC (rev 4081)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-10-09 17:33:44 UTC (rev 4082)
@@ -24,6 +24,8 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -529,28 +531,41 @@
createSeamProjectPreferenes(project, model);
- try {
+// try {
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
String wsPath = project.getLocation().removeLastSegments(1)
.toFile().getAbsoluteFile().getPath();
+
+ IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
+
if(!isWarConfiguration(model)) {
- ResourcesUtils.importProject(
- wsPath+"/"+project.getName()+"-ejb", monitor); //$NON-NLS-1$ //$NON-NLS-2$
- ResourcesUtils.importProject(
- wsPath+"/"+project.getName()+"-ear", monitor); //$NON-NLS-1$ //$NON-NLS-2$
+// ResourcesUtils.importProject(
+// wsPath+"/"+project.getName()+"-ejb", monitor); //$NON-NLS-1$ //$NON-NLS-2$
+
+ IProject ejbProjectToBeImported = wsRoot.getProject(project.getName()+"-ejb");
+ ResourcesUtils.importExistingProject(ejbProjectToBeImported, wsPath+"/"+project.getName()+"-ejb", project.getName()+"-ejb");
+
+// ResourcesUtils.importProject(
+// wsPath+"/"+project.getName()+"-ear", monitor); //$NON-NLS-1$ //$NON-NLS-2$
+
+ IProject earProjectToBeImported = wsRoot.getProject(project.getName()+"-ear");
+ ResourcesUtils.importExistingProject(earProjectToBeImported, wsPath+"/"+project.getName()+"-ear", project.getName()+"-ear");
}
- ResourcesUtils.importProject(
- wsPath+"/"+project.getName()+"-test", monitor); //$NON-NLS-1$ //$NON-NLS-2$
+
+// ResourcesUtils.importProject(
+// wsPath+"/"+project.getName()+"-test", monitor); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- } catch (InvocationTargetException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- } catch (InterruptedException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
-
+ IProject testProjectToBeImported = wsRoot.getProject(project.getName()+"-test");
+ ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath+"/"+project.getName()+"-test", project.getName()+"-test");
+
+// } catch (IOException e) {
+// SeamCorePlugin.getPluginLog().logError(e);
+// } catch (InvocationTargetException e) {
+// SeamCorePlugin.getPluginLog().logError(e);
+// } catch (InterruptedException e) {
+// SeamCorePlugin.getPluginLog().logError(e);
+// }
}
17 years, 3 months
JBoss Tools SVN: r4081 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-09 13:33:36 -0400 (Tue, 09 Oct 2007)
New Revision: 4081
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1016 Duplicate seam folders generated when select path not to workspace
No more duplicates.
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2007-10-09 16:48:23 UTC (rev 4080)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2007-10-09 17:33:36 UTC (rev 4081)
@@ -70,6 +70,16 @@
return importedPrj;
}
+ public static IProject importExistingProject(IProject project, String location, String name) throws CoreException {
+ IPath path = new Path(location).append(".project");
+ IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(path);
+ description.setName(name);
+ project.create(description, new NullProgressMonitor());
+ project.open(IResource.BACKGROUND_REFRESH, new NullProgressMonitor());
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ return project;
+ }
+
public static IProject createEclipseProject(String projectName,
IProgressMonitor monitor) throws CoreException {
17 years, 3 months
JBoss Tools SVN: r4080 - trunk/documentation/qa/reports.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2007-10-09 12:48:23 -0400 (Tue, 09 Oct 2007)
New Revision: 4080
Added:
trunk/documentation/qa/reports/smoke-09.10.2007.doc
Log:
Added a file remotely
Added: trunk/documentation/qa/reports/smoke-09.10.2007.doc
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/reports/smoke-09.10.2007.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r4079 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-10-09 12:06:28 -0400 (Tue, 09 Oct 2007)
New Revision: 4079
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
Log:
JBIDE-983: Objects on diagram must have context menu
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -11,12 +11,15 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.ui.veditor.VisualEditorPlugin;
import org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor;
import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.SpecialRootClass;
+import org.jboss.tools.hibernate.ui.view.views.HibernateUtils;
import org.jboss.tools.hibernate.ui.view.views.ObjectEditorInput;
import org.jboss.tools.hibernate.ui.view.views.OpenFileActionUtils;
@@ -33,7 +36,6 @@
ObjectEditorInput objectEditorInput = (ObjectEditorInput)((VisualEditor)getWorkbenchPart()).getEditorInput();
ConsoleConfiguration consoleConfiguration = objectEditorInput.getConfiguration();
java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
- Document doc = OpenFileActionUtils.getDocument(consoleConfiguration, configXMLFile);
IJavaProject proj = objectEditorInput.getJavaProject();
VisualEditor part = (VisualEditor)getWorkbenchPart();
@@ -47,23 +49,45 @@
if (selectedElement instanceof RootClass) {
RootClass rootClass = (RootClass)selectedElement;
- resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, rootClass);
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, rootClass);
if (resource == null) {
- String fullyQualifiedName = rootClass.getClassName();
- try {
- resource = proj.findType(fullyQualifiedName).getResource();
- } catch (JavaModelException e) {
- VisualEditorPlugin.getDefault().logInfo("Can't find mapping file", e);
- }
+ if (OpenFileActionUtils.rootClassHasAnnotations(consoleConfiguration, configXMLFile, rootClass)) {
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
+ try {
+ resource = proj.findType(fullyQualifiedName).getResource();
+ } catch (JavaModelException e) {
+ VisualEditorPlugin.getDefault().logInfo("Can't find mapping file", e);
+ }
+ } else {
+ if (rootClass instanceof SpecialRootClass) {
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile,
+ ((SpecialRootClass)rootClass).getProperty().getPersistentClass()
+ );
+ }
+ }
}
} else if (selectedElement instanceof Table) {
Table table = (Table)selectedElement;
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, table);
- resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, table);
+ if (resource == null) {
+ Iterator classMappingsIterator = consoleConfiguration.getConfiguration().getClassMappings();
+ while (classMappingsIterator.hasNext()) {
+ PersistentClass elem = (PersistentClass) classMappingsIterator.next();
+ if (HibernateUtils.getTableName(elem.getTable()).equals(HibernateUtils.getTableName(table))) {
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(elem.getClassName());
+ try {
+ resource = proj.findType(fullyQualifiedName).getResource();
+ } catch (JavaModelException e) {
+ VisualEditorPlugin.getDefault().logInfo("Can't find mapping file", e);
+ }
+ }
+ }
+ }
} else if (selectedElement instanceof Subclass) {
Subclass rootClass = (Subclass)selectedElement;
- resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, rootClass);
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, rootClass);
}
if (resource != null) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -17,6 +17,7 @@
import org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor;
import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
+import org.jboss.tools.hibernate.ui.view.views.HibernateUtils;
import org.jboss.tools.hibernate.ui.view.views.ObjectEditorInput;
import org.jboss.tools.hibernate.ui.view.views.OpenFileActionUtils;
@@ -42,7 +43,7 @@
PersistentClass rootClass = (PersistentClass) iterator.next();
IResource resource = null;
- String fullyQualifiedName = rootClass.getClassName();
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
if (fullyQualifiedName.indexOf("$") > 0) {
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$"));
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HTConstants.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -8,4 +8,6 @@
public static String HIBERNATE_TAG_SESSION_FACTORY = "session-factory";
public static String HIBERNATE_TAG_MAPPING = "mapping";
public static String HIBERNATE_TAG_RESOURCE = "resource";
+ public static String HIBERNATE_TAG_CATALOG = "catalog";
+ public static String HIBERNATE_TAG_SCHEMA = "schema";
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -10,10 +10,12 @@
public class HibernateUtils {
+ public static String getTableName(String catalog, String schema, String name) {
+ return (catalog != null ? catalog + "." : "") + (schema != null ? schema + "." : "") + name;
+ }
+
public static String getTableName(Table table) {
- String catalog = table.getCatalog();
- String schema = table.getSchema();
- return (catalog != null ? catalog + "." : "") + (schema != null ? schema + "." : "") + table.getName();
+ return getTableName(table.getCatalog(), table.getSchema(), table.getName());
}
public static String getPersistentClassName(String className) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -70,6 +70,11 @@
return proj;
}
+ public static boolean rootClassHasAnnotations(ConsoleConfiguration consoleConfiguration, java.io.File configXMLFile, RootClass rootClass) {
+ Document doc = getDocument(consoleConfiguration, configXMLFile);
+ return getElements(doc, HTConstants.HIBERNATE_TAG_MAPPING, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(rootClass.getClassName())).hasNext();
+ }
+
private static boolean elementInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Object element) {
if (element instanceof RootClass) {
return rootClassInResource(consoleConfiguration, resource, (RootClass)element);
@@ -84,28 +89,44 @@
public static boolean rootClassInResource(ConsoleConfiguration consoleConfiguration, IResource resource, RootClass persistentClass) {
Document doc = getDocument(consoleConfiguration, resource.getLocation().toFile());
- return getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(persistentClass.getClassName())).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, persistentClass.getClassName()).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, StringHelper.unqualify(persistentClass.getClassName())).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, persistentClass.getClassName()).hasNext();
+ return getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_CLASS, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext();
}
public static boolean subclassInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Subclass persistentClass) {
Document doc = getDocument(consoleConfiguration, resource.getLocation().toFile());
- return getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(persistentClass.getClassName())).hasNext() ||
- getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, persistentClass.getClassName()).hasNext();
+ return getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, StringHelper.unqualify(HibernateUtils.getPersistentClassName(persistentClass.getClassName()))).hasNext() ||
+ getElements(doc, HTConstants.HIBERNATE_TAG_SUBCLASS, HTConstants.HIBERNATE_TAG_NAME, HibernateUtils.getPersistentClassName(persistentClass.getClassName())).hasNext();
}
public static boolean tableInResource(ConsoleConfiguration consoleConfiguration, IResource resource, Table table) {
Document doc = getDocument(consoleConfiguration, resource.getLocation().toFile());
- if (getElements(doc, HTConstants.HIBERNATE_TAG_TABLE, HibernateUtils.getTableName(table)).hasNext()) {
- return true;
- }
-
Iterator classes = getElements(doc, HTConstants.HIBERNATE_TAG_CLASS);
while (classes.hasNext()) {
Element element = (Element) classes.next();
+
+ Attribute tableAttr = element.attribute( HTConstants.HIBERNATE_TAG_TABLE );
+ if (tableAttr != null) {
+ Attribute catalogAttr = element.attribute( HTConstants.HIBERNATE_TAG_CATALOG );
+ if (catalogAttr == null) catalogAttr = doc.getRootElement().attribute(HTConstants.HIBERNATE_TAG_CATALOG);
+ Attribute schemaAttr = element.attribute( HTConstants.HIBERNATE_TAG_SCHEMA );
+ if (schemaAttr == null) schemaAttr = doc.getRootElement().attribute(HTConstants.HIBERNATE_TAG_SCHEMA);
+ if (HibernateUtils.
+ getTableName(
+ (catalogAttr != null ? catalogAttr.getValue() : null),
+ (schemaAttr != null ? schemaAttr.getValue() : null),
+ tableAttr.getValue()
+ ).equals(HibernateUtils.getTableName(table))
+ ) {
+ return true;
+ }
+
+
+ }
+
Attribute classNameAttr = element.attribute( HTConstants.HIBERNATE_TAG_NAME );
String physicalTableName = consoleConfiguration.getConfiguration().getNamingStrategy().classToTableName(classNameAttr.getValue());
if (table.getName().equals(physicalTableName)) {
@@ -209,7 +230,8 @@
return doc;
}
- public static IResource getResource(ConsoleConfiguration consoleConfiguration, IJavaProject proj, Document doc, java.io.File configXMLFile, Object element) {
+ public static IResource getResource(ConsoleConfiguration consoleConfiguration, IJavaProject proj, java.io.File configXMLFile, Object element) {
+ Document doc = getDocument(consoleConfiguration, configXMLFile);
IResource resource = null;
if (consoleConfiguration != null && proj != null && doc != null) {
Element sfNode = doc.getRootElement().element( HTConstants.HIBERNATE_TAG_SESSION_FACTORY );
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -66,10 +66,11 @@
IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
Document doc = OpenFileActionUtils.getDocument(consoleConfiguration, configXMLFile);
- IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, rootClass);
+// IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, rootClass);
+ IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, rootClass);
if (resource == null) {
- String fullyQualifiedName = rootClass.getClassName();
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
try {
resource = proj.findType(fullyQualifiedName).getResource();
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-10-09 15:15:36 UTC (rev 4078)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-10-09 16:06:28 UTC (rev 4079)
@@ -31,7 +31,7 @@
IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
IResource resource = null;
- String fullyQualifiedName = rootClass.getClassName();
+ String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass.getClassName());
try {
resource = proj.findType(fullyQualifiedName).getResource();
} catch (JavaModelException e) {
17 years, 3 months
JBoss Tools SVN: r4078 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-10-09 11:15:36 -0400 (Tue, 09 Oct 2007)
New Revision: 4078
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG11.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG12.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG13.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG14.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG5.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG6.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG7.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG8.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG9.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-182 testNG chapter added in Getting Started guide
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG11.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG12.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG12.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG13.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG13.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG14.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG14.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG6.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG7.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG8.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG9.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-10-09 14:42:31 UTC (rev 4077)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-10-09 15:15:36 UTC (rev 4078)
@@ -10,7 +10,7 @@
<!ENTITY GenCURDDatabaseApp SYSTEM "modules/GenCURDDatabaseApp.xml">
<!ENTITY CURDAppWalkthrough SYSTEM "modules/CURDAppWalkthrough.xml">
<!ENTITY AddBusinessProcess SYSTEM "modules/AddBusinessProcess.xml">
-
+<!ENTITY testNG SYSTEM "modules/testNG.xml">
]>
<book>
@@ -37,6 +37,7 @@
&RADdevelopmentOfSimpleJSFapplication;
&GenCURDDatabaseApp;
&CURDAppWalkthrough;
+&testNG;
<!-- TODO: drools used in this section is not available for eclipse .3.3 &AddBusinessProcess; -->
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml (rev 0)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml 2007-10-09 15:15:36 UTC (rev 4078)
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="testNG" xreflabel="testNG">
+ <?dbhtml filename="testNG.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>RHDS</keyword>
+ <keyword>testNG</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Using TestNG project</title>
+ <section>
+ <title>What is it TestNG?</title>
+ <para><property>TestNG</property> ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit.
+ <property>TestNG</property> introduces some new functionalities that make it more powerful and easier to use, such as:</para>
+ <itemizedlist>
+ <listitem><para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations).</para></listitem>
+ <listitem><para>Flexible test configuration.</para></listitem>
+ <listitem><para>Support for data-driven testing (with @DataProvider).</para></listitem>
+ <listitem><para>Support for parameters.</para></listitem>
+ <listitem><para>Allows distribution of tests on slave machines.</para></listitem>
+ <listitem><para>Powerful execution model (no more TestSuite).</para></listitem>
+ <listitem><para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...).</para></listitem>
+ <listitem><para>Embeds BeanShell for further flexibility.</para></listitem>
+ <listitem><para>Default JDK functions for runtime and logging (no dependencies).</para></listitem>
+ <listitem><para>Dependent methods for application server testing.</para></listitem>
+ </itemizedlist>
+
+ <para>More information can be found on home page: <ulink url="http://testng.org">www.testng.org</ulink></para>
+ </section>
+ <section id="OtherRelevantResourcesOnTheTopic5">
+ <?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para><ulink url="http://www.artima.com/lejava/articles/testng.html">Next-Generation Testing with TestNG (An Interview with Cédric Beust)</ulink></para>
+ <para><ulink url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html">TestNG: The next generation of unit testing</ulink></para>
+ <para><ulink url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html">Test Categorization Techniques with TestNG</ulink></para>
+ <para><ulink url="http://www-128.ibm.com/developerworks/java/library/j-testng/">TestNG makes Java unit testing a breeze</ulink></para>
+ <para><ulink url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/index.html">In pursuit of code quality: JUnit 4 vs. TestNG</ulink></para>
+ </section>
+ <section>
+ <title>How to use the generated Seam-test project to run Seam tests in Red Hat Developer Studio</title>
+
+ <itemizedlist>
+ <listitem><para>Create a new Seam Web Project using New Project wizard or main menu <emphasis><property>File > New > Seam Web Project</property>.</emphasis></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam Web Project creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Name your project and follow the next wizard steps keeping default settings.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Check <emphasis><property>Server Supplied JSF Implementation</property>.</emphasis></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Adding JSF capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Select <property>EAR</property> next to <emphasis><property>Deploy as:</property></emphasis> field.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Select deployment type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>After project is created you will have the generated Seam-test project that is setup to run TestNG directly against the proper libraries and server runtime libraries.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam-test project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Add Seam Action to your project via <emphasis><property>File > New > Seam Action</property>.</emphasis></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam Action creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Fill out the wizard fields. Seam Action wizard will create resources and place them in the apropriate folders dependent on EAR project structure.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Action wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run the test via right click <emphasis><property>Run As > TestNG Suite</property>.</emphasis></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>After running TestNG you will have the test results in <emphasis><property>test-output</property></emphasis> folder in Seam-test project (press F5 to refresh the Package Explorer view). Open <property>index.html</property> file with web browser.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Opening test results in web browser</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Test results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ </section>
+ </chapter>
17 years, 3 months
JBoss Tools SVN: r4077 - trunk/common/plugins/org.jboss.tools.common.model/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-09 10:42:31 -0400 (Tue, 09 Oct 2007)
New Revision: 4077
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1056
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml 2007-10-09 14:32:01 UTC (rev 4076)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml 2007-10-09 14:42:31 UTC (rev 4077)
@@ -3468,7 +3468,7 @@
</GroupHTML>
<GroupHTML ENTITY="SharableGroupHTML" HIDDEN="no" ICON=""
NAME="Core" PREFIX="c" SCOPE="project"
- URI="http://java.sun.com/jsp/jstl/core" add_taglib="true"
+ URI="http://java.sun.com/jstl/core" add_taglib="true"
library-version="">
<MacroHTML
DESCRIPTION="<html>\n <table width="300">\n <tr>\n <td>\n\t<font color="OLIVE"><b>Name:</b></font> <code><br>Otherwise</code> <br>\n <font color="OLIVE"><b>Syntax:</b></font> <code><br>&lt;c:otherwise&gt;<br>&lt;/c:otherwise&gt;</code>\n <br>\n <font color="OLIVE"><b>Atributes:</b></font>\n <code><br>\n </code>\n </td>\n </tr>\n </table>\n</html>\n"
@@ -3532,11 +3532,11 @@
ICON="%Icons%/Struts HTML/link" NAME="url" REFORMAT="yes"
SCOPE="project" STARTTEXT="<url value="|">" />
<MacroHTML
- DESCRIPTION="<b>Syntax:</b><br><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;</code>"
+ DESCRIPTION="<b>Syntax:</b><br><code>&lt;%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %&gt;</code>"
ENDTEXT="" ENTITY="SharableMacroHTML"
ICON="%Icons%/Struts Common/taglib" NAME="JSTL Core taglib"
REFORMAT="yes" SCOPE="project"
- STARTTEXT="<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\\n|" />
+ STARTTEXT="<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>\\n|" />
<MacroHTML
DESCRIPTION="<html>\n <table width="300">\n <tr>\n <td>\n\t<font color="OLIVE"><b>Name:</b></font> <code><br>Redirect</code> <br>\n <font color="OLIVE"><b>Syntax:</b></font> <code><br>&lt;c:redirect&gt;<br>&lt;/c:redirect&gt;</code>\n <br>\n <font color="OLIVE"><b>Atributes:</b></font>\n <code><br>\n <b>url</b>,\n var,\n scope,\n context\n </code>\n </td>\n </tr>\n </table>\n</html>\n"
ENDTEXT="</redirect>" ENTITY="SharableMacroHTML"
17 years, 3 months
JBoss Tools SVN: r4076 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-09 10:32:01 -0400 (Tue, 09 Oct 2007)
New Revision: 4076
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
Log:
JBIDE-1053
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2007-10-09 13:36:57 UTC (rev 4075)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2007-10-09 14:32:01 UTC (rev 4076)
@@ -71,17 +71,19 @@
protected String getDefaultPageTemplate() {
String defaultPageTemplate = null;
String nature = getTarget().getModel().getProperties().getProperty("nature");
- try {
- if(nature.indexOf("jsf") >= 0) {
- XModelObject obj = PreferenceModelUtilities.getPreferenceModel().getByPath(NewJSFProjectPath);
- defaultPageTemplate = obj.getAttributeValue("Page Template");
- } else if(nature.indexOf("struts") >= 0) {
- XModelObject obj = PreferenceModelUtilities.getPreferenceModel().getByPath(NewStrutsProjectPath);
- defaultPageTemplate = obj.getAttributeValue("Page Template");
- }
- } catch (Exception x) {
- WebModelPlugin.getPluginLog().logError(x);
+ if(nature == null) {
+ return null;
}
+ String prefPath = (nature.indexOf("jsf") >= 0) ? NewJSFProjectPath :
+ (nature.indexOf("struts") >= 0) ? NewStrutsProjectPath :
+ null;
+ if(prefPath == null) return null;
+ XModelObject pref = PreferenceModelUtilities.getPreferenceModel().getByPath(prefPath);
+ if(pref == null) {
+ WebModelPlugin.getPluginLog().logError("Cannot find preference object " + prefPath, new Exception());
+ return null;
+ }
+ defaultPageTemplate = pref.getAttributeValue("Page Template");
return defaultPageTemplate;
}
17 years, 3 months
JBoss Tools SVN: r4075 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-09 09:36:57 -0400 (Tue, 09 Oct 2007)
New Revision: 4075
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-979
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 2007-10-09 07:56:22 UTC (rev 4074)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-09 13:36:57 UTC (rev 4075)
@@ -17,13 +17,14 @@
import java.util.List;
import java.util.Map;
-import org.apache.tools.ant.types.FilterSet;
import org.apache.tools.ant.types.FilterSetCollection;
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.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
@@ -32,6 +33,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.ui.ide.IDE;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
@@ -40,7 +42,7 @@
import org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetFilterSetFactory;
-import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.widget.editor.INamedElement;
import org.osgi.service.prefs.BackingStoreException;
@@ -108,12 +110,23 @@
List<String[]> fileMapping = getFileMappings(vars);
List<String[]> fileMappingCopy = applayVariables(fileMapping,vars);
FilterSetCollection filters = getFilterSetCollection(vars);
+ File[] file = new File[fileMappingCopy.size()];
+ int index=0;
for (String[] mapping : fileMappingCopy) {
- AntCopyUtils.copyFileToFile(new File(mapping[0]),new File(mapping[1]),filters,true);
+ file[index] = new File(mapping[1]);
+ AntCopyUtils.copyFileToFile(new File(mapping[0]),file[index],filters,true);
+ index++;
}
project.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
+ if(file.length > 0){
+ IFile iFile = project.getWorkspace().getRoot().getFileForLocation(new Path(file[0].getAbsolutePath()));
+ IDE.openEditor(SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(), iFile);
+ }
+
} catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
} catch (BackingStoreException e) {
17 years, 3 months
JBoss Tools SVN: r4074 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-09 03:56:22 -0400 (Tue, 09 Oct 2007)
New Revision: 4074
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1023
fields name have been adusted to fix NPE
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-09 07:31:55 UTC (rev 4073)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-09 07:56:22 UTC (rev 4074)
@@ -60,9 +60,8 @@
public void doFillDefaults(PropertyChangeEvent event) {
if(event.getPropertyName().equals(IParameter.SEAM_ENTITY_CLASS_NAME)) {
if(event.getNewValue()==null||"".equals(event.getNewValue().toString().trim())) { //$NON-NLS-1$
- setDefaultValue(IParameter.SEAM_COMPONENT_NAME, ""); //$NON-NLS-1$
- setDefaultValue(IParameter.SEAM_LOCAL_INTERFACE_NAME, ""); //$NON-NLS-1$
- setDefaultValue(IParameter.SEAM_METHOD_NAME, ""); //$NON-NLS-1$
+ setDefaultValue(IParameter.SEAM_ENTITY_CLASS_NAME, ""); //$NON-NLS-1$
+ setDefaultValue(IParameter.SEAM_MASTER_PAGE_NAME, ""); //$NON-NLS-1$
setDefaultValue(IParameter.SEAM_PAGE_NAME, ""); //$NON-NLS-1$
} else {
String value = event.getNewValue().toString();
17 years, 3 months