JBoss Tools SVN: r19507 - in branches/jbosstools-3.1.0.RC1: bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-21 18:29:53 -0500 (Mon, 21 Dec 2009)
New Revision: 19507
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
branches/jbosstools-3.1.0.RC1/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
Log:
JBIDE-5087 - to cr1
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-12-21 23:13:41 UTC (rev 19506)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-12-21 23:29:53 UTC (rev 19507)
@@ -57,6 +57,15 @@
this.moduleType = moduleType;
this.facetType = facetType;
}
+
+ protected JBTProjectModuleFactory factoryDelegate;
+ protected JBTProjectModuleFactory getFactory() {
+ if (factoryDelegate == null)
+ factoryDelegate = (JBTProjectModuleFactory)getFactory(getFactoryId());
+ return factoryDelegate;
+ }
+
+ protected abstract String getFactoryId();
@Override
protected void clearCache(IProject project) {
@@ -66,10 +75,31 @@
@Override
public ModuleDelegate getModuleDelegate(IModule module) {
+ // override for eclipse bug 251813
+ String id = module.getId();
+ if( id.startsWith(getFactoryId() + ":") && !id.startsWith(getFactoryId() + ":" + this.facetType)) {
+ // This is probably coming from ProjectRefactorOperation, bad news there
+ IModule tempModule = internalCreateModule(module.getProject());
+ if( moduleToDelegate.get(tempModule) != null)
+ return moduleToDelegate.get(tempModule);
+ }
return moduleToDelegate.get(module);
}
protected IModule[] createModules(IProject project) {
+ IModule module = internalCreateModule(project);
+ if( module != null ) {
+ JBTProjectModuleDelegate delegate = createDelegate(project);
+ moduleToDelegate.put(module, delegate);
+
+ createBinaryModules(ComponentCore.createComponent(project), delegate);
+ // TODO - create children!!! see JEEDeployableFactory
+ return new IModule[] { module };
+ }
+ return null;
+ }
+
+ protected IModule internalCreateModule(IProject project) {
IFacetedProject facetProject;
try {
facetProject = ProjectFacetsManager.create(project);
@@ -87,12 +117,7 @@
moduleType,
version.getVersionString(),
project);
- JBTProjectModuleDelegate delegate = createDelegate(project);
- moduleToDelegate.put(module, delegate);
-
- createBinaryModules(ComponentCore.createComponent(project), delegate);
- // TODO - create children!!! see JEEDeployableFactory
- return new IModule[] { module };
+ return module;
}
} catch (CoreException e) {
ASWTPToolsPlugin.getDefault().getLog().log(e.getStatus());
Modified: branches/jbosstools-3.1.0.RC1/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2009-12-21 23:13:41 UTC (rev 19506)
+++ branches/jbosstools-3.1.0.RC1/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2009-12-21 23:29:53 UTC (rev 19507)
@@ -18,12 +18,9 @@
public class BPELModuleFactoryDelegate extends JBTProjectModuleFactory {
public static final String FACTORY_ID = "org.jboss.tools.bpel.runtimes.module.moduleFactory";
public static final String MODULE_TYPE = IBPELModuleFacetConstants.BPEL_MODULE_TYPE;
- private static BPELModuleFactoryDelegate factDelegate;
- public static BPELModuleFactoryDelegate getFactory() {
- if (factDelegate == null)
- factDelegate = (BPELModuleFactoryDelegate)getFactory(FACTORY_ID);
- return factDelegate;
+ public String getFactoryId() {
+ return FACTORY_ID;
}
public BPELModuleFactoryDelegate() {
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-12-21 23:13:41 UTC (rev 19506)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-12-21 23:29:53 UTC (rev 19507)
@@ -19,14 +19,11 @@
public class JBossESBModuleFactory extends JBTProjectModuleFactory {
public static final String FACTORY_ID = "org.jboss.tools.esb.project.core.moduleFactory";
public static final String MODULE_TYPE = IJBossESBFacetDataModelProperties.JBOSS_ESB_FACET_ID;
- private static JBossESBModuleFactory factDelegate;
- public static JBossESBModuleFactory getFactory() {
- if (factDelegate == null)
- factDelegate = (JBossESBModuleFactory)getFactory(FACTORY_ID);
- return factDelegate;
+ public String getFactoryId() {
+ return FACTORY_ID;
}
-
+
public JBossESBModuleFactory() {
super(MODULE_TYPE, ESBProjectConstant.ESB_PROJECT_FACET);
}
15 years
JBoss Tools SVN: r19506 - in trunk: bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-21 18:13:41 -0500 (Mon, 21 Dec 2009)
New Revision: 19506
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
Log:
JBIDE-5087 fixed in trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-12-21 23:11:48 UTC (rev 19505)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-12-21 23:13:41 UTC (rev 19506)
@@ -57,6 +57,15 @@
this.moduleType = moduleType;
this.facetType = facetType;
}
+
+ protected JBTProjectModuleFactory factoryDelegate;
+ protected JBTProjectModuleFactory getFactory() {
+ if (factoryDelegate == null)
+ factoryDelegate = (JBTProjectModuleFactory)getFactory(getFactoryId());
+ return factoryDelegate;
+ }
+
+ protected abstract String getFactoryId();
@Override
protected void clearCache(IProject project) {
@@ -66,10 +75,31 @@
@Override
public ModuleDelegate getModuleDelegate(IModule module) {
+ // override for eclipse bug 251813
+ String id = module.getId();
+ if( id.startsWith(getFactoryId() + ":") && !id.startsWith(getFactoryId() + ":" + this.facetType)) {
+ // This is probably coming from ProjectRefactorOperation, bad news there
+ IModule tempModule = internalCreateModule(module.getProject());
+ if( moduleToDelegate.get(tempModule) != null)
+ return moduleToDelegate.get(tempModule);
+ }
return moduleToDelegate.get(module);
}
protected IModule[] createModules(IProject project) {
+ IModule module = internalCreateModule(project);
+ if( module != null ) {
+ JBTProjectModuleDelegate delegate = createDelegate(project);
+ moduleToDelegate.put(module, delegate);
+
+ createBinaryModules(ComponentCore.createComponent(project), delegate);
+ // TODO - create children!!! see JEEDeployableFactory
+ return new IModule[] { module };
+ }
+ return null;
+ }
+
+ protected IModule internalCreateModule(IProject project) {
IFacetedProject facetProject;
try {
facetProject = ProjectFacetsManager.create(project);
@@ -87,12 +117,7 @@
moduleType,
version.getVersionString(),
project);
- JBTProjectModuleDelegate delegate = createDelegate(project);
- moduleToDelegate.put(module, delegate);
-
- createBinaryModules(ComponentCore.createComponent(project), delegate);
- // TODO - create children!!! see JEEDeployableFactory
- return new IModule[] { module };
+ return module;
}
} catch (CoreException e) {
ASWTPToolsPlugin.getDefault().getLog().log(e.getStatus());
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2009-12-21 23:11:48 UTC (rev 19505)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2009-12-21 23:13:41 UTC (rev 19506)
@@ -18,12 +18,9 @@
public class BPELModuleFactoryDelegate extends JBTProjectModuleFactory {
public static final String FACTORY_ID = "org.jboss.tools.bpel.runtimes.module.moduleFactory";
public static final String MODULE_TYPE = IBPELModuleFacetConstants.BPEL_MODULE_TYPE;
- private static BPELModuleFactoryDelegate factDelegate;
- public static BPELModuleFactoryDelegate getFactory() {
- if (factDelegate == null)
- factDelegate = (BPELModuleFactoryDelegate)getFactory(FACTORY_ID);
- return factDelegate;
+ public String getFactoryId() {
+ return FACTORY_ID;
}
public BPELModuleFactoryDelegate() {
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-12-21 23:11:48 UTC (rev 19505)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-12-21 23:13:41 UTC (rev 19506)
@@ -19,14 +19,11 @@
public class JBossESBModuleFactory extends JBTProjectModuleFactory {
public static final String FACTORY_ID = "org.jboss.tools.esb.project.core.moduleFactory";
public static final String MODULE_TYPE = IJBossESBFacetDataModelProperties.JBOSS_ESB_FACET_ID;
- private static JBossESBModuleFactory factDelegate;
- public static JBossESBModuleFactory getFactory() {
- if (factDelegate == null)
- factDelegate = (JBossESBModuleFactory)getFactory(FACTORY_ID);
- return factDelegate;
+ public String getFactoryId() {
+ return FACTORY_ID;
}
-
+
public JBossESBModuleFactory() {
super(MODULE_TYPE, ESBProjectConstant.ESB_PROJECT_FACET);
}
15 years
JBoss Tools SVN: r19505 - 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: 2009-12-21 18:11:48 -0500 (Mon, 21 Dec 2009)
New Revision: 19505
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
Log:
random javadoc change
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2009-12-21 21:17:38 UTC (rev 19504)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2009-12-21 23:11:48 UTC (rev 19505)
@@ -66,6 +66,13 @@
setModulePublishState(module, result);
}
+ /**
+ * This should only be called once per overall publish.
+ * publishStart() should call this, cache the method, and use it
+ * until after publishFinish() is called.
+ *
+ * @return
+ */
protected IJBossServerPublishMethod createPublishMethod() {
return new LocalPublishMethod(); // TODO FIX THIS
}
15 years
JBoss Tools SVN: r19504 - in trunk: cdi/plugins/org.jboss.tools.cdi.core/META-INF and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-12-21 16:17:38 -0500 (Mon, 21 Dec 2009)
New Revision: 19504
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencePage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF 2009-12-21 21:17:38 UTC (rev 19504)
@@ -16,14 +16,17 @@
org.eclipse.wst.common.frameworks,
org.jboss.tools.jst.web.kb,
org.jboss.tools.common.el.core,
- org.eclipse.jface.text
+ org.eclipse.jface.text,
+ org.eclipse.equinox.preferences
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
Export-Package: org.jboss.tools.cdi.core,
+ org.jboss.tools.cdi.core.preferences,
org.jboss.tools.cdi.internal.core.el,
org.jboss.tools.cdi.internal.core.impl,
org.jboss.tools.cdi.internal.core.impl.definition,
org.jboss.tools.cdi.internal.core.project.facet,
org.jboss.tools.cdi.internal.core.scanner,
- org.jboss.tools.cdi.internal.core.scanner.lib
+ org.jboss.tools.cdi.internal.core.scanner.lib,
+ org.jboss.tools.cdi.internal.core.validation
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2009-12-21 21:17:38 UTC (rev 19504)
@@ -91,4 +91,8 @@
resolver-class="org.jboss.tools.cdi.internal.core.el.CdiElResolver"/>
</el-resolver>
</extension>
+
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.jboss.tools.cdi.core.preferences.CDIPreferenceInitializer"/>
+ </extension>
</plugin>
\ No newline at end of file
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(CDICorePlugin.PLUGIN_ID);
+ for (String name : CDIPreferences.SEVERITY_OPTION_NAMES) {
+ defaultPreferences.put(name, SeverityPreferences.ERROR);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.preferences;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIPreferences extends SeverityPreferences {
+
+ public static final Set<String> SEVERITY_OPTION_NAMES = new HashSet<String>();
+
+ private static CDIPreferences INSTANCE = new CDIPreferences();
+
+ // Test group
+
+ // Test
+ public static final String TEST = INSTANCE.createSeverityOption("testKey"); //$NON-NLS-1$
+
+ /**
+ * @return the only instance of CDIPreferences
+ */
+ public static CDIPreferences getInstance() {
+ return INSTANCE;
+ }
+
+ private CDIPreferences() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#createSeverityOption(java.lang.String)
+ */
+ @Override
+ protected String createSeverityOption(String shortName) {
+ String name = getPluginId() + ".validator.problem." + shortName; //$NON-NLS-1$
+ SEVERITY_OPTION_NAMES.add(name);
+ return name;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#getPluginId()
+ */
+ @Override
+ protected String getPluginId() {
+ return CDICorePlugin.PLUGIN_ID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#getSeverityOptionNames()
+ */
+ @Override
+ protected Set<String> getSeverityOptionNames() {
+ return SEVERITY_OPTION_NAMES;
+ }
+
+ public static boolean shouldValidateCore(IProject project) {
+ return true;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.internal.core.validation;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIValidationMessages {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.cdi.internal.core.validation.messages"; //$NON-NLS-1$
+
+ public static String testKey;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, CDIValidationMessages.class);
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1 @@
+testKey=Test Key
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2009-12-21 21:17:38 UTC (rev 19504)
@@ -3,5 +3,8 @@
ConfigureMenu_AddCDISupport=Add CDI support...
ConfigureMenu_RemoveCDISupport=Remove CDI support...
+PreferencePage_Validator=Validator
+PreferencePage_CDI=CDI
+
Bundle-Vendor.0 = JBoss by Red Hat
Bundle-Name.0 = Context and Dependency Injection UI
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2009-12-21 21:17:38 UTC (rev 19504)
@@ -16,6 +16,21 @@
</page>
</extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.jboss.tools.common.model.ui.cdi"
+ class="org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"
+ id="org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"
+ name="%PreferencePage_Validator">
+ </page>
+ <page
+ category="org.jboss.tools.common.model.ui"
+ class="org.jboss.tools.cdi.ui.preferences.CDIPreferencePage"
+ id="org.jboss.tools.common.model.ui.cdi"
+ name="%PreferencePage_CDI">
+ </page>
+ </extension>
+
<extension
point="org.eclipse.ui.popupMenus">
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.preferences;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIConfigurationBlock extends SeverityConfigurationBlock {
+
+ private static final String SETTINGS_SECTION_NAME = "CDIValidatorConfigurationBlock";
+
+ private static SectionDescription SECTION_TEST = new SectionDescription(
+ CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_test,
+ new String[][]{
+ {CDIPreferences.TEST, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_test_label}
+ },
+ CDICorePlugin.PLUGIN_ID
+ );
+
+ private static SectionDescription[] ALL_SECTIONS = new SectionDescription[]{
+ SECTION_TEST
+ };
+
+ private static Key[] getKeys() {
+ ArrayList<Key> keys = new ArrayList<Key>();
+ for (int i = 0; i < ALL_SECTIONS.length; i++) {
+ for (int j = 0; j < ALL_SECTIONS[i].options.length; j++) {
+ keys.add(ALL_SECTIONS[i].options[j].key);
+ }
+ }
+ return keys.toArray(new Key[0]);
+ }
+
+ public CDIConfigurationBlock(IStatusChangeListener context,
+ IProject project, IWorkbenchPreferenceContainer container) {
+ super(context, project, getKeys(), container);
+ }
+
+ @Override
+ protected SectionDescription[] getAllSections() {
+ return ALL_SECTIONS;
+ }
+
+ @Override
+ protected String getCommonDescription() {
+ return CDIPreferencesMessages.CDIValidatorConfigurationBlock_common_description;
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ return CDICorePlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencePage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencePage.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencePage.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.preferences;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite root = new Composite(parent, SWT.NONE);
+ GridLayout gl = new GridLayout(1, false);
+ root.setLayout(gl);
+
+ return root;
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -21,6 +21,19 @@
public static String CDI_SETTINGS_PREFERENCE_PAGE_CDI_SUPPORT;
+ // Validator Preference page
+ public static String CDIValidatorConfigurationBlock_common_description;
+
+ public static String CDIValidatorConfigurationBlock_needsbuild_title;
+ public static String CDIValidatorConfigurationBlock_needsfullbuild_message;
+ public static String CDIValidatorConfigurationBlock_needsprojectbuild_message;
+
+ // Section Test
+ public static String CDIValidatorConfigurationBlock_section_test;
+ public static String CDIValidatorConfigurationBlock_pb_test_label;
+
+ public static String CDI_VALIDATOR_PREFERENCE_PAGE_CDI_VALIDATOR;
+
static {
NLS.initializeMessages(BUNDLE_NAME, CDIPreferencesMessages.class);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2009-12-21 21:17:38 UTC (rev 19504)
@@ -9,4 +9,16 @@
### Red Hat, Inc. - initial API and implementation
##################################################################################
-CDI_SETTINGS_PREFERENCE_PAGE_CDI_SUPPORT=CDI support\:
\ No newline at end of file
+CDI_SETTINGS_PREFERENCE_PAGE_CDI_SUPPORT=CDI support\:
+
+CDIValidatorConfigurationBlock_common_description=Select the severity level for the following optional CDI Validator problems:
+
+CDIValidatorConfigurationBlock_needsbuild_title=CDI Validator Settings Changed
+CDIValidatorConfigurationBlock_needsfullbuild_message=The CDI Validator settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
+CDIValidatorConfigurationBlock_needsprojectbuild_message=The CDI Validator settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
+
+##Section Test
+CDIValidatorConfigurationBlock_section_test=Test
+CDIValidatorConfigurationBlock_pb_test_label=Test:
+
+CDI_VALIDATOR_PREFERENCE_PAGE_CDI_VALIDATOR=CDI Validator
\ No newline at end of file
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.preferences;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIValidatorPreferencePage extends SeverityPreferencePage {
+
+ public static final String PREF_ID = "org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PROP_ID = "org.jboss.tools.cdi.ui.propertyPages.CDIValidatorPreferencePage"; //$NON-NLS-1$
+
+ public CDIValidatorPreferencePage() {
+ setPreferenceStore(CDICorePlugin.getDefault().getPreferenceStore());
+ setTitle(CDIPreferencesMessages.CDI_VALIDATOR_PREFERENCE_PAGE_CDI_VALIDATOR);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID()
+ */
+ @Override
+ protected String getPreferencePageID() {
+ return PREF_ID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
+ */
+ @Override
+ protected String getPropertyPageID() {
+ return PROP_ID;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
+ fConfigurationBlock = new CDIConfigurationBlock(getNewStatusChangedListener(), getProject(), container);
+
+ super.createControl(parent);
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2009-12-21 21:17:38 UTC (rev 19504)
@@ -11,7 +11,8 @@
org.eclipse.jdt.ui,
org.eclipse.core.resources,
org.eclipse.ui.ide,
- org.eclipse.jst.j2ee.ui
+ org.eclipse.jst.j2ee.ui,
+ org.eclipse.ui.forms
Export-Package: org.jboss.tools.common.ui,
org.jboss.tools.common.ui.preferences,
org.jboss.tools.common.ui.widget.editor,
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -15,8 +15,10 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
+import org.eclipse.jdt.internal.ui.preferences.ScrolledPageContent;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontMetrics;
@@ -25,6 +27,8 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
@@ -57,14 +61,69 @@
protected static final String ENABLED = JavaCore.ENABLED;
protected static final String DISABLED = JavaCore.DISABLED;
- protected abstract Composite createStyleTabContent(Composite folder);
+ protected String[] errorWarningIgnore = new String[] {ERROR, WARNING, IGNORE};
+ protected String[] enableDisableValues= new String[] {ENABLED, DISABLED};
+ protected String[] errorWarningIgnoreLabels = new String[] {
+ SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_ERROR,
+ SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_WARNING,
+ SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_IGNORE
+ };
+
public SeverityConfigurationBlock(IStatusChangeListener context,
IProject project, Key[] allKeys,
IWorkbenchPreferenceContainer container) {
super(context, project, allKeys, container);
}
+ protected abstract String getCommonDescription();
+
+ protected abstract SectionDescription[] getAllSections();
+
+ protected abstract IDialogSettings getDialogSettings();
+
+ protected Composite createStyleTabContent(Composite folder) {
+ int nColumns = 3;
+
+ final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
+
+ Composite composite = sc1.getBody();
+ GridLayout layout= new GridLayout(nColumns, false);
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ composite.setLayout(layout);
+
+ Label description= new Label(composite, SWT.LEFT | SWT.WRAP);
+ description.setFont(description.getFont());
+ description.setText(getCommonDescription());
+ description.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, nColumns - 1, 1));
+
+ int defaultIndent = 0;
+
+ SectionDescription[] sections = getAllSections();
+ for (int i = 0; i < sections.length; i++) {
+ SectionDescription section = sections[i];
+ String label = section.label;
+ ExpandableComposite excomposite = createStyleSection(composite, label, nColumns);
+
+ Composite inner = new Composite(excomposite, SWT.NONE);
+ inner.setFont(composite.getFont());
+ inner.setLayout(new GridLayout(nColumns, false));
+ excomposite.setClient(inner);
+
+ for (int j = 0; j < section.options.length; j++) {
+ OptionDescription option = section.options[j];
+ label = option.label;
+ addComboBox(inner, label, option.key, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
+ }
+ }
+
+ IDialogSettings section = getDialogSettings();
+ restoreSectionExpansionStates(section);
+
+ return sc1;
+ }
+
@Override
protected Control createContents(Composite parent) {
setShell(parent.getShell());
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -29,7 +29,6 @@
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
-import org.jboss.tools.common.ui.preferences.SeverityPreferencesMessages;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.preferences.JSFSeverityPreferences;
@@ -81,15 +80,6 @@
@Override
protected Composite createStyleTabContent(Composite folder) {
- String[] errorWarningIgnore = new String[] {ERROR, WARNING, IGNORE};
- String[] enableDisableValues= new String[] {ENABLED, DISABLED};
-
- String[] errorWarningIgnoreLabels = new String[] {
- SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_ERROR,
- SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_WARNING,
- SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_IGNORE
- };
-
int nColumns = 3;
final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
@@ -102,7 +92,7 @@
Label description= new Label(composite, SWT.LEFT | SWT.WRAP);
description.setFont(description.getFont());
- description.setText(JSFSeverityPreferencesMessages.JSFValidatorConfigurationBlock_common_description);
+ description.setText(getCommonDescription());
description.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, nColumns - 1, 1));
int defaultIndent = 0;
@@ -153,8 +143,7 @@
}
}
- IDialogSettings section = JSFModelPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
- restoreSectionExpansionStates(section);
+ restoreSectionExpansionStates(getDialogSettings());
updateELCombox();
@@ -172,4 +161,19 @@
recognizeVarsCheckBox.setEnabled(enable);
revalidateUnresolvedElCheckBox.setEnabled(enable);
}
+
+ @Override
+ protected SectionDescription[] getAllSections() {
+ return ALL_SECTIONS;
+ }
+
+ @Override
+ protected String getCommonDescription() {
+ return JSFSeverityPreferencesMessages.JSFValidatorConfigurationBlock_common_description;
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ return JSFModelPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
+ }
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-12-21 21:17:38 UTC (rev 19504)
@@ -6,7 +6,6 @@
Bundle-Activator: org.jboss.tools.seam.ui.SeamGuiPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui.ide,
- org.eclipse.ui.forms,
org.eclipse.ui.navigator,
org.eclipse.ui.navigator.resources,
org.eclipse.jst.servlet.ui,
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -85,14 +85,8 @@
public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_HAS_WARNING;
- public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR;
-
- public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_IGNORE;
-
public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_SEAM_VALIDATOR_CONFIGURATION_BLOCK;
- public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_WARNING;
-
public static String SEAM_VALIDATOR_PREFERENCE_PAGE_SEAM_VALIDATOR;
public static String SEAM_SETTINGS_PREFERENCE_PAGE_CREATE_TEST;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2009-12-21 21:17:38 UTC (rev 19504)
@@ -60,11 +60,8 @@
SeamValidatorConfigurationBlock_pb_invalidXMLVersion_label=Invalid components.xml version:
SEAM_VALIDATOR_CONFIGURATION_BLOCK_SEAM_VALIDATOR_CONFIGURATION_BLOCK=SeamValidatorConfigurationBlock
-SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR=Error
-SEAM_VALIDATOR_CONFIGURATION_BLOCK_WARNING=Warning
SEAM_VALIDATOR_PREFERENCE_PAGE_SEAM_VALIDATOR=Seam Validator
-SEAM_VALIDATOR_CONFIGURATION_BLOCK_IGNORE=Ignore
SEAM_SETTINGS_PREFERENCES_PAGE_SEAM_PROJECT=Main Seam Project:
SEAM_SETTINGS_PREFERENCES_PAGE_EJB_PROJECT=Seam EJB Project:
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -14,23 +14,15 @@
import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.ui.preferences.ScrolledPageContent;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
/**
- * Find in SeamPreferences the instruction to Framework for Severity preferences
+ * Find the Severity Framework instruction in SeamPreferences
* To modify section descriptions:
* 1) If new option is to be added to existing description,
* add array of two String objects, where first is the preference name
@@ -133,13 +125,6 @@
SECTION_SETTINGS
};
- private static final String ERROR = SeamPreferences.ERROR;
- private static final String WARNING = SeamPreferences.WARNING;
- private static final String IGNORE = SeamPreferences.IGNORE;
-
- private static final String ENABLED= JavaCore.ENABLED;
- private static final String DISABLED= JavaCore.DISABLED;
-
//private PixelConverter fPixelConverter;
private static Key[] getKeys() {
@@ -159,52 +144,17 @@
}
@Override
- protected Composite createStyleTabContent(Composite folder) {
- String[] errorWarningIgnore = new String[] {ERROR, WARNING, IGNORE};
+ protected SectionDescription[] getAllSections() {
+ return ALL_SECTIONS;
+ }
- String[] errorWarningIgnoreLabels = new String[] {
- SeamPreferencesMessages.SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR,
- SeamPreferencesMessages.SEAM_VALIDATOR_CONFIGURATION_BLOCK_WARNING,
- SeamPreferencesMessages.SEAM_VALIDATOR_CONFIGURATION_BLOCK_IGNORE
- };
+ @Override
+ protected String getCommonDescription() {
+ return SeamPreferencesMessages.SeamValidatorConfigurationBlock_common_description;
+ }
- int nColumns = 3;
-
- final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
-
- Composite composite = sc1.getBody();
- GridLayout layout= new GridLayout(nColumns, false);
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- composite.setLayout(layout);
-
- Label description= new Label(composite, SWT.LEFT | SWT.WRAP);
- description.setFont(description.getFont());
- description.setText(SeamPreferencesMessages.SeamValidatorConfigurationBlock_common_description);
- description.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, nColumns - 1, 1));
-
- int defaultIndent = 0;
-
- for (int i = 0; i < ALL_SECTIONS.length; i++) {
- SectionDescription section = ALL_SECTIONS[i];
- String label = section.label;
- ExpandableComposite excomposite = createStyleSection(composite, label, nColumns);
-
- Composite inner = new Composite(excomposite, SWT.NONE);
- inner.setFont(composite.getFont());
- inner.setLayout(new GridLayout(nColumns, false));
- excomposite.setClient(inner);
-
- for (int j = 0; j < section.options.length; j++) {
- OptionDescription option = section.options[j];
- label = option.label;
- addComboBox(inner, label, option.key, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
- }
- }
-
- IDialogSettings section = SeamCorePlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
- restoreSectionExpansionStates(section);
-
- return sc1;
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ return SeamCorePlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java 2009-12-21 18:10:08 UTC (rev 19503)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java 2009-12-21 21:17:38 UTC (rev 19504)
@@ -11,7 +11,6 @@
package org.jboss.tools.seam.ui.preferences;
-import org.eclipse.core.resources.IProject;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
@@ -40,11 +39,6 @@
}
@Override
- protected boolean hasProjectSpecificOptions(IProject project) {
- return fConfigurationBlock.hasProjectSpecificOptions(project);
- }
-
- @Override
public void createControl(Composite parent) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
fConfigurationBlock = new SeamValidatorConfigurationBlock(getNewStatusChangedListener(), getProject(), container);
15 years
JBoss Tools SVN: r19503 - in trunk/hibernatetools: plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-12-21 13:10:08 -0500 (Mon, 21 Dec 2009)
New Revision: 19503
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CompilationUnitCollector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5330 - update
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -54,6 +54,11 @@
public static String NewHibernateMappingFileWizard_look_for_dependent_cu;
public static String NewHibernateMappingFileWizard_selection_cant_be_empty;
+ public static String EntitiesSource_header;
+ public static String EntitiesSource_description;
+ public static String EntitiesList_header;
+ public static String EntitiesList_description;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, JdtUiMessages.class);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties 2009-12-21 18:10:08 UTC (rev 19503)
@@ -57,3 +57,8 @@
NewHibernateMappingFileWizard_create_empty_xml_mapping_file=Create a new empty XML Mapping files
NewHibernateMappingFileWizard_look_for_dependent_cu=Search for dependent compilation units...
NewHibernateMappingFileWizard_selection_cant_be_empty=Selection can't be empty
+
+EntitiesSource_header=Hibernate: add JPA annotations for classes
+EntitiesSource_description=Add classes and packages to proceed with
+EntitiesList_header=Hibernate: add JPA annotations to the related set of entities
+EntitiesList_description=The following classes will be changed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -12,20 +12,13 @@
import java.lang.reflect.Field;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
-import java.util.Map;
import java.util.Set;
import org.eclipse.core.internal.filebuffers.SynchronizableDocument;
-import org.eclipse.core.internal.resources.File;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
@@ -34,11 +27,7 @@
import org.eclipse.jdt.internal.core.ClassFile;
import org.eclipse.jdt.internal.core.ExternalPackageFragmentRoot;
import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
-import org.eclipse.jdt.internal.core.JavaElement;
-import org.eclipse.jdt.internal.core.JavaElementInfo;
-import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.PackageFragment;
-import org.eclipse.jdt.internal.core.PackageFragmentRoot;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.IDocument;
@@ -54,6 +43,7 @@
import org.hibernate.eclipse.jdt.ui.Activator;
import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.CompilationUnitCollector;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AllEntitiesProcessor;
@@ -80,7 +70,7 @@
* selected compilation units for startup processing,
* result of processing selection
*/
- protected Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
+ protected CompilationUnitCollector compileUnitCollector = new CompilationUnitCollector();
/**
* responsible to gather information
*/
@@ -109,7 +99,7 @@
* Cleanup collection of selected elements for processing
*/
public void clearSelectionCU() {
- selectionCU.clear();
+ compileUnitCollector.clearSelectionCU();
}
/**
@@ -117,18 +107,7 @@
* @param cu compilation unit
*/
public void addCompilationUnit(ICompilationUnit cu) {
- if (cu != null) {
- IType[] types = null;
- try {
- types = cu.getTypes();
- } catch (JavaModelException e) {
- // just ignore it
- }
- if (types != null) {
-
- }
- selectionCU.add(cu);
- }
+ compileUnitCollector.addCompilationUnit(cu, true);
}
/**
@@ -138,51 +117,30 @@
if (selection != null) {
updateSelectedItems(selection);
selection = null;
- }
- else {
- if (selectionCU.size() == 0) {
+ } else {
+ if (getSelectionCUSize() == 0) {
updateOpen();
return;
}
}
- if (selectionCU.size() == 0) {
- processor.modify(null, new HashMap<String, EntityInfo>(), true);
+ if (getSelectionCUSize() == 0) {
+ processor.modify(new HashMap<String, EntityInfo>(), true, createSelection2Update());
return;
}
- Iterator<ICompilationUnit> it = selectionCU.iterator();
- Map<IJavaProject, Set<ICompilationUnit>> mapJP_CUSet =
- new HashMap<IJavaProject, Set<ICompilationUnit>>();
+ Iterator<ICompilationUnit> it = compileUnitCollector.setSelectionCUIterator();
+ /**/
while (it.hasNext()) {
ICompilationUnit cu = it.next();
- Set<ICompilationUnit> set = mapJP_CUSet.get(cu.getJavaProject());
- if (set == null) {
- set = new HashSet<ICompilationUnit>();
- mapJP_CUSet.put(cu.getJavaProject(), set);
- }
- set.add(cu);
+ collector.collect(cu);
}
- Iterator<Map.Entry<IJavaProject, Set<ICompilationUnit>>>
- mapIt = mapJP_CUSet.entrySet().iterator();
- while (mapIt.hasNext()) {
- Map.Entry<IJavaProject, Set<ICompilationUnit>>
- entry = mapIt.next();
- IJavaProject javaProject = entry.getKey();
- Iterator<ICompilationUnit> setIt = entry.getValue().iterator();
- collector.initCollector(javaProject);
- while (setIt.hasNext()) {
- ICompilationUnit icu = setIt.next();
- collector.collect(icu);
- }
- collector.resolveRelations();
- if (collector.getNonInterfaceCUNumber() > 0) {
- processor.setAnnotationStylePreference(collector.getAnnotationStylePreference());
- processor.modify(javaProject, collector.getMapCUs_Info(), true);
- }
- else {
- MessageDialog.openInformation(getShell(),
- JdtUiMessages.JPAMapToolActor_message_title,
- JdtUiMessages.JPAMapToolActor_message);
- }
+ collector.resolveRelations();
+ if (collector.getNonInterfaceCUNumber() > 0) {
+ processor.setAnnotationStylePreference(collector.getAnnotationStylePreference());
+ processor.modify(collector.getMapCUs_Info(), true, createSelection2Update());
+ } else {
+ MessageDialog.openInformation(getShell(),
+ JdtUiMessages.JPAMapToolActor_message_title,
+ JdtUiMessages.JPAMapToolActor_message);
}
processor.savePreferences();
}
@@ -216,14 +174,15 @@
CompilationUnitEditor cue = (CompilationUnitEditor)editor;
ICompilationUnit cu = (ICompilationUnit)cue.getViewPartInput();
if (cu != null) {
- IJavaProject javaProject = cu.getJavaProject();
- collector.initCollector(javaProject);
+ //IJavaProject javaProject = cu.getJavaProject();
+ //collector.initCollector(javaProject);
+ collector.initCollector();
collector.collect(cu);
collector.resolveRelations();
if (collector.getNonInterfaceCUNumber() > 0) {
- processor.modify(javaProject, collector.getMapCUs_Info(), true);
- }
- else {
+ //processor.modify(javaProject, collector.getMapCUs_Info(), true, createSelection2Update());
+ processor.modify(collector.getMapCUs_Info(), true, createSelection2Update());
+ } else {
MessageDialog.openInformation(getShell(),
JdtUiMessages.JPAMapToolActor_message_title,
JdtUiMessages.JPAMapToolActor_message);
@@ -244,11 +203,9 @@
if (selection == null) {
//res = selectionCU.size();
res = 1;
- }
- else if (selection instanceof TextSelection) {
+ } else if (selection instanceof TextSelection) {
res = 1;
- }
- else if (selection instanceof TreeSelection) {
+ } else if (selection instanceof TreeSelection) {
TreeSelection treeSelection = (TreeSelection)selection;
res = treeSelection.size();
Iterator<?> it = treeSelection.iterator();
@@ -295,8 +252,7 @@
if (resultCU != null && resultCU.types().size() > 0 ) {
if (resultCU.getPackage() != null) {
fullyQualifiedName = resultCU.getPackage().getName().getFullyQualifiedName() + "."; //$NON-NLS-1$
- }
- else {
+ } else {
fullyQualifiedName = ""; //$NON-NLS-1$
}
Object tmp = resultCU.types().get(0);
@@ -321,8 +277,7 @@
ICompilationUnit cu = Utils.findCompilationUnit(fullyQualifiedName);
addCompilationUnit(cu);
}
- }
- else if (sel instanceof TreeSelection) {
+ } else if (sel instanceof TreeSelection) {
clearSelectionCU();
TreeSelection treeSelection = (TreeSelection)sel;
Iterator<?> it = treeSelection.iterator();
@@ -330,8 +285,7 @@
Object obj = it.next();
processJavaElements(obj);
}
- }
- else {
+ } else {
//System.out.println("2 Blah! " + selection); //$NON-NLS-1$
sel = null;
}
@@ -346,11 +300,9 @@
boolean res = false;
if (obj instanceof JarPackageFragmentRoot) {
res = true;
- }
- else if (obj instanceof ClassFile) {
+ } else if (obj instanceof ClassFile) {
res = true;
- }
- else if (obj instanceof PackageFragment) {
+ } else if (obj instanceof PackageFragment) {
PackageFragment pf = (PackageFragment)obj;
try {
if (pf.getKind() == IPackageFragmentRoot.K_BINARY) {
@@ -359,8 +311,7 @@
} catch (JavaModelException e) {
// ignore
}
- }
- else if (obj instanceof ExternalPackageFragmentRoot) {
+ } else if (obj instanceof ExternalPackageFragmentRoot) {
res = true;
}
return res;
@@ -371,78 +322,7 @@
* @param obj
*/
public void processJavaElements(Object obj) {
- if (obj instanceof ICompilationUnit) {
- ICompilationUnit cu = (ICompilationUnit)obj;
- addCompilationUnit(cu);
- }
- else if (obj instanceof File) {
- File file = (File)obj;
- if (file.getProject() != null) {
- IJavaProject javaProject = JavaCore.create(file.getProject());
- ICompilationUnit[] cus = Utils.findCompilationUnits(javaProject,
- file.getFullPath());
- if (cus != null) {
- for (int i = 0; i < cus.length; i++) {
- addCompilationUnit(cus[i]);
- }
- }
- }
- }
- else if (obj instanceof JavaProject) {
- JavaProject javaProject = (JavaProject)obj;
- IPackageFragmentRoot[] pfr = null;
- try {
- pfr = javaProject.getAllPackageFragmentRoots();
- } catch (JavaModelException e) {
- // just ignore it!
- //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
- }
- if (pfr != null) {
- for (int i = 0; i < pfr.length; i++) {
- processJavaElements(pfr[i]);
- }
- }
- }
- else if (obj instanceof PackageFragment) {
- PackageFragment packageFragment = (PackageFragment)obj;
- ICompilationUnit[] cus = null;
- try {
- cus = packageFragment.getCompilationUnits();
- } catch (JavaModelException e) {
- // just ignore it!
- //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
- }
- if (cus != null) {
- for (int i = 0; i < cus.length; i++) {
- addCompilationUnit(cus[i]);
- }
- }
- }
- else if (obj instanceof PackageFragmentRoot) {
- JavaElement javaElement = (JavaElement)obj;
- JavaElementInfo javaElementInfo = null;
- try {
- javaElementInfo = (JavaElementInfo)javaElement.getElementInfo();
- } catch (JavaModelException e) {
- // just ignore it!
- //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
- }
- if (javaElementInfo != null) {
- IJavaElement[] je = javaElementInfo.getChildren();
- for (int i = 0; i < je.length; i++) {
- processJavaElements(je[i]);
- }
- }
- }
- else if (obj instanceof JavaElement) {
- JavaElement javaElement = (JavaElement)obj;
- ICompilationUnit cu = javaElement.getCompilationUnit();
- addCompilationUnit(cu);
- }
- else {
- // ignore
- //System.out.println("1 Blah! " + selection); //$NON-NLS-1$
- }
+ compileUnitCollector.processJavaElements(obj, true);
}
/**
@@ -451,6 +331,7 @@
*/
synchronized public void setSelection(ISelection selection) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
+ compileUnitCollector.clearSelection2UpdateList();
if (selection instanceof StructuredSelection && selection.isEmpty()) {
//System.out.println("This! " + this.selection); //$NON-NLS-1$
clearSelectionCU();
@@ -460,6 +341,10 @@
this.selection = selection;
}
+ public StructuredSelection createSelection2Update() {
+ return compileUnitCollector.createSelection2Update();
+ }
+
// setters for testing
public void setAllEntitiesInfoCollector(AllEntitiesInfoCollector collector) {
@@ -471,10 +356,10 @@
}
public void setSelectionCU(Set<ICompilationUnit> selectionCU) {
- this.selectionCU = selectionCU;
+ compileUnitCollector.setSelectionCU(selectionCU);
}
public int getSelectionCUSize() {
- return selectionCU.size();
+ return compileUnitCollector.getSelectionCUSize();
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -36,12 +36,8 @@
public class AllEntitiesInfoCollector {
/**
- * place to search compilation units
- */
- protected IJavaProject javaProject;
- /**
* map:
- * fullyQualifiedName entity name -> EntityInfo
+ * javaProjectName + "/" + fullyQualifiedName entity name -> EntityInfo
* this collection of processed entities
*/
protected Map<String, EntityInfo> mapCUs_Info = new TreeMap<String, EntityInfo>();
@@ -50,11 +46,9 @@
*/
protected AnnotStyle annotationStylePreference = AnnotStyle.FIELDS;
- public void initCollector(IJavaProject javaProject) {
- // setup java project
- this.javaProject = javaProject;
+ public void initCollector() {
// clear collection
- mapCUs_Info = new TreeMap<String, EntityInfo>();
+ mapCUs_Info.clear();
}
/**
@@ -108,8 +102,9 @@
// entry.getKey() - fully qualified name
// entry.getValue() - EntityInfo
EntityInfo entryInfo = entry.getValue();
- assert(entry.getKey().equals(entryInfo.getFullyQualifiedName()));
String fullyQualifiedName = entryInfo.getFullyQualifiedName();
+ String javaProjectName = entryInfo.getJavaProjectName();
+ assert(entry.getKey().equals(javaProjectName + "/" + fullyQualifiedName)); //$NON-NLS-1$
// get references map:
// * field id -> RefEntityInfo
Iterator<Map.Entry<String, RefEntityInfo>> referencesIt =
@@ -121,7 +116,7 @@
pi.fieldId = entry2.getKey();
pi.refEntityInfo = entry2.getValue();
String fullyQualifiedName2 = pi.refEntityInfo.fullyQualifiedName;
- EntityInfo entryInfo2 = mapCUs_Info.get(fullyQualifiedName2);
+ EntityInfo entryInfo2 = mapCUs_Info.get(javaProjectName + "/" + fullyQualifiedName2); //$NON-NLS-1$
assert(fullyQualifiedName2.equals(entryInfo2.getFullyQualifiedName()));
if (entryInfo2 != null && pi.refEntityInfo != null) {
pi.refEntityInfo2 = null;
@@ -257,8 +252,9 @@
// entry.getKey() - fully qualified name
// entry.getValue() - EntityInfo
EntityInfo entryInfo = entry.getValue();
- assert(entry.getKey().equals(entryInfo.getFullyQualifiedName()));
String fullyQualifiedName = entryInfo.getFullyQualifiedName();
+ String javaProjectName = entryInfo.getJavaProjectName();
+ assert(entry.getKey().equals(javaProjectName + "/" + fullyQualifiedName)); //$NON-NLS-1$
// get references map:
// * field id -> RefEntityInfo
Iterator<Map.Entry<String, RefEntityInfo>> referencesIt =
@@ -270,7 +266,7 @@
pi.fieldId = entry2.getKey();
pi.refEntityInfo = entry2.getValue();
String fullyQualifiedName2 = pi.refEntityInfo.fullyQualifiedName;
- EntityInfo entryInfo2 = mapCUs_Info.get(fullyQualifiedName2);
+ EntityInfo entryInfo2 = mapCUs_Info.get(javaProjectName + "/" + fullyQualifiedName2); //$NON-NLS-1$
assert(fullyQualifiedName2.equals(entryInfo2.getFullyQualifiedName()));
if (entryInfo2 != null && pi.refEntityInfo != null) {
pi.refEntityInfo2 = null;
@@ -322,11 +318,11 @@
}
}
- public boolean hasMappedSuperclassVersion(String parentName) {
+ public boolean hasMappedSuperclassVersion(String javaProjectName, String parentName) {
if (parentName == null) {
return false;
}
- EntityInfo entryInfoParent = mapCUs_Info.get(parentName);
+ EntityInfo entryInfoParent = mapCUs_Info.get(javaProjectName + "/" + parentName); //$NON-NLS-1$
if (entryInfoParent == null) {
return false;
}
@@ -351,8 +347,9 @@
while (it.hasNext()) {
Map.Entry<String, EntityInfo> entry = it.next();
EntityInfo entityInfo = entry.getValue();
+ String javaProjectName = entityInfo.getJavaProjectName();
String parentName = entityInfo.getFullyQualifiedParentName();
- if (hasMappedSuperclassVersion(parentName)) {
+ if (hasMappedSuperclassVersion(javaProjectName, parentName)) {
entityInfo.setAddVersionFlag(false);
}
else {
@@ -662,7 +659,7 @@
if (ei == null) {
return;
}
- EntityInfo parentEI = mapCUs_Info.get(ei.getFullyQualifiedParentName());
+ EntityInfo parentEI = mapCUs_Info.get(ei.getJavaProjectName() + "/" + ei.getFullyQualifiedParentName()); //$NON-NLS-1$
adjustParentId(parentEI);
ei.adjustPrimaryId(parentEI);
}
@@ -673,14 +670,15 @@
* @param fullyQualifiedName of startup point entity fully qualified name
* example: "org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector"
*/
- public void collect(String fullyQualifiedName) {
+ public void collect(String fullyQualifiedName, String projectName) {
if (fullyQualifiedName == null) {
return;
}
- if (mapCUs_Info.containsKey(fullyQualifiedName)) {
+ if (mapCUs_Info.containsKey(projectName + "/" + fullyQualifiedName)) { //$NON-NLS-1$
return;
}
+ final IJavaProject javaProject = Utils.findJavaProject(projectName);
ICompilationUnit icu = Utils.findCompilationUnit(javaProject, fullyQualifiedName);
collect(icu);
}
@@ -716,6 +714,8 @@
// ignore EnumDeclaration & AnnotationTypeDeclaration
return;
}
+ IJavaProject javaProject = icu.getJavaProject();
+ String projectName = (javaProject != null) ? javaProject.getProject().getName() : ""; //$NON-NLS-1$
ArrayList<String> fullyQualifiedNames = new ArrayList<String>();
//TODO: should inspect all types in cu? so next method to get fullyQualifiedName:
if (cu.getTypeRoot() == null || cu.getTypeRoot().findPrimaryType() == null) {
@@ -732,17 +732,18 @@
Iterator<String> itFQNames = fullyQualifiedNames.iterator();
while (itFQNames.hasNext()) {
String fullyQualifiedName = itFQNames.next();
- if (!mapCUs_Info.containsKey(fullyQualifiedName)) {
+ if (!mapCUs_Info.containsKey(projectName + "/" + fullyQualifiedName)) { //$NON-NLS-1$
CollectEntityInfo finder = new CollectEntityInfo(fullyQualifiedName);
cu.accept(finder);
EntityInfo result = finder.getEntityInfo();
if (result != null) {
result.adjustParameters();
- mapCUs_Info.put(fullyQualifiedName, result);
+ result.setJavaProjectName(projectName);
+ mapCUs_Info.put(projectName + "/" + fullyQualifiedName, result); //$NON-NLS-1$
Iterator<String> itDep = result.getDependences();
while (itDep.hasNext()) {
String fullyQualifiedNameTmp = itDep.next();
- collect(fullyQualifiedNameTmp);
+ collect(fullyQualifiedNameTmp, projectName);
}
}
}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CompilationUnitCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CompilationUnitCollector.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CompilationUnitCollector.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.collect;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.internal.resources.File;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.JavaElement;
+import org.eclipse.jdt.internal.core.JavaElementInfo;
+import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jdt.internal.core.PackageFragment;
+import org.eclipse.jdt.internal.core.PackageFragmentRoot;
+import org.eclipse.jdt.internal.core.SourceType;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
+
+/**
+ * @author Vitali
+ */
+@SuppressWarnings("restriction")
+public class CompilationUnitCollector {
+ /**
+ * selection - start point for wizard selection update page
+ */
+ protected List<Object> selection2UpdateList = new ArrayList<Object>();
+ /**
+ * selected compilation units for startup processing,
+ * result of processing selection
+ */
+ protected Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
+
+ /**
+ * Cleanup collection of selected elements for processing
+ */
+ public void clearSelectionCU() {
+ selectionCU.clear();
+ }
+
+ public Iterator<ICompilationUnit> setSelectionCUIterator() {
+ return this.selectionCU.iterator();
+ }
+
+ public void setSelectionCU(Set<ICompilationUnit> selectionCU) {
+ this.selectionCU = selectionCU;
+ }
+
+ public int getSelectionCUSize() {
+ return selectionCU.size();
+ }
+
+ public void clearSelection2UpdateList() {
+ selection2UpdateList.clear();
+ }
+
+ public StructuredSelection createSelection2Update() {
+ return new StructuredSelection(selection2UpdateList);
+ }
+
+ /**
+ * Adds compilation unit into collection of selected elements for processing
+ * @param cu compilation unit
+ */
+ public void addCompilationUnit(ICompilationUnit cu, boolean bCollect) {
+ if (cu != null) {
+ IType[] types = null;
+ try {
+ types = cu.getTypes();
+ } catch (JavaModelException e) {
+ // just ignore it
+ }
+ if (types != null) {
+ if (bCollect) {
+ for (int i = 0; i < types.length; i++) {
+ if (types[i] instanceof SourceType) {
+ selection2UpdateList.add(types[i]);
+ }
+ }
+ bCollect = false;
+ }
+ }
+ selectionCU.add(cu);
+ }
+ }
+
+ /**
+ * Process object - java element to collect all it's children CompilationUnits
+ * @param obj
+ */
+ public void processJavaElements(Object obj, boolean bCollect) {
+ if (obj instanceof ICompilationUnit) {
+ ICompilationUnit cu = (ICompilationUnit)obj;
+ addCompilationUnit(cu, bCollect);
+ } else if (obj instanceof File) {
+ File file = (File)obj;
+ if (file.getProject() != null) {
+ IJavaProject javaProject = JavaCore.create(file.getProject());
+ ICompilationUnit[] cus = Utils.findCompilationUnits(javaProject,
+ file.getFullPath());
+ if (cus != null) {
+ for (int i = 0; i < cus.length; i++) {
+ addCompilationUnit(cus[i], bCollect);
+ }
+ }
+ }
+ } else if (obj instanceof JavaProject) {
+ JavaProject javaProject = (JavaProject)obj;
+ IPackageFragmentRoot[] pfr = null;
+ try {
+ pfr = javaProject.getAllPackageFragmentRoots();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
+ if (pfr != null) {
+ for (int i = 0; i < pfr.length; i++) {
+ processJavaElements(pfr[i], bCollect);
+ }
+ }
+ } else if (obj instanceof PackageFragment) {
+ PackageFragment packageFragment = (PackageFragment)obj;
+ ICompilationUnit[] cus = null;
+ try {
+ cus = packageFragment.getCompilationUnits();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
+ if (cus != null && cus.length > 0) {
+ if (bCollect) {
+ selection2UpdateList.add(obj);
+ bCollect = false;
+ }
+ for (int i = 0; i < cus.length; i++) {
+ addCompilationUnit(cus[i], bCollect);
+ }
+ }
+ } else if (obj instanceof PackageFragmentRoot) {
+ JavaElement javaElement = (JavaElement)obj;
+ JavaElementInfo javaElementInfo = null;
+ try {
+ javaElementInfo = (JavaElementInfo)javaElement.getElementInfo();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
+ if (javaElementInfo != null) {
+ IJavaElement[] je = javaElementInfo.getChildren();
+ for (int i = 0; i < je.length; i++) {
+ processJavaElements(je[i], true);
+ }
+ }
+ } else if (obj instanceof JavaElement) {
+ JavaElement javaElement = (JavaElement)obj;
+ ICompilationUnit cu = javaElement.getCompilationUnit();
+ addCompilationUnit(cu, bCollect);
+ } else if (obj instanceof SourceType) {
+ if (bCollect) {
+ selection2UpdateList.add(obj);
+ bCollect = false;
+ }
+ SourceType sourceType = (SourceType)obj;
+ processJavaElements(sourceType.getJavaModel(), bCollect);
+ } else {
+ // ignore
+ //System.out.println("1 Blah! " + selection); //$NON-NLS-1$
+ }
+ }
+
+ public void collectFromSelection2UpdateList() {
+ clearSelectionCU();
+ Iterator<Object> it = selection2UpdateList.iterator();
+ while (it.hasNext()) {
+ processJavaElements(it.next(), true);
+ }
+ }
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -30,6 +30,10 @@
public class EntityInfo {
/*
+ * fully java project name
+ */
+ protected String javaProjectName = ""; //$NON-NLS-1$
+ /*
* fully qualified entity name
*/
protected String fullyQualifiedName = ""; //$NON-NLS-1$
@@ -317,6 +321,14 @@
return ""; //$NON-NLS-1$
}
+ public String getJavaProjectName() {
+ return javaProjectName;
+ }
+
+ public void setJavaProjectName(String javaProjectName) {
+ this.javaProjectName = javaProjectName;
+ }
+
public String getFullyQualifiedName() {
return fullyQualifiedName;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -55,11 +55,13 @@
static public IType findType(IJavaProject javaProject,
String fullyQualifiedName) {
IType lwType = null;
- try {
- lwType = javaProject.findType(fullyQualifiedName);
- } catch (JavaModelException e) {
- // just ignore it!
- //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ if (javaProject != null) {
+ try {
+ lwType = javaProject.findType(fullyQualifiedName);
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
}
return lwType;
}
@@ -80,6 +82,31 @@
}
return resCompilationUnit;
}
+
+ static public IProject findProject(String projectName) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject[] projects = root.getProjects();
+ IProject res = null;
+ for (int i = 0; i < projects.length && res == null; i++) {
+ if (projects[i].exists() && projects[i].getName().compareTo(projectName) == 0) {
+ res = projects[i];
+ }
+ }
+ return res;
+ }
+
+ static public IJavaProject findJavaProject(String projectName) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject[] projects = root.getProjects();
+ IJavaProject res = null;
+ for (int i = 0; i < projects.length && res == null; i++) {
+ if (projects[i].exists() && projects[i].getName().compareTo(projectName) == 0) {
+ IJavaProject javaProject = JavaCore.create(projects[i]);
+ res = javaProject;
+ }
+ }
+ return res;
+ }
static public ICompilationUnit[] findCompilationUnits(IJavaProject javaProject,
IPath path) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -29,6 +29,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.text.edits.MalformedTreeException;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.jdt.ui.Activator;
@@ -36,6 +37,7 @@
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfosCollection;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.HibernateJPAWizard;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.HibernateJPAWizardDataFactory;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.IHibernateJPAWizardData;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.IHibernateJPAWizardParams;
@@ -46,10 +48,6 @@
*/
public class AllEntitiesProcessor implements IHibernateJPAWizardParams {
/**
- * place to search compilation units
- */
- protected IJavaProject javaProject = null;
- /**
* place to store default settings
*/
protected IPreferenceStore preferenceStore = null;
@@ -147,13 +145,13 @@
* @param entities - collection
* @param askConfirmation - ask user confirmation (show dialog)
*/
- public void modify(IJavaProject project, Map<String, EntityInfo> entities,
- boolean askConfirmation) {
+ //public void modify(IJavaProject project, Map<String, EntityInfo> entities,
+ public void modify(Map<String, EntityInfo> entities,
+ boolean askConfirmation, IStructuredSelection selection2Update) {
changes.clear();
- setJavaProject(project);
// get the buffer manager
- ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
- /*Iterator<Map.Entry<String, EntityInfo>> it = entities.entrySet().iterator();
+ /** /
+ Iterator<Map.Entry<String, EntityInfo>> it = entities.entrySet().iterator();
String outText = ""; //$NON-NLS-1$
String ls = System.getProperties().getProperty("line.separator", "\n"); //$NON-NLS-1$//$NON-NLS-2$
while (it.hasNext()) {
@@ -165,35 +163,10 @@
// TODO: save entity name as has compiler problems
}
outText += entry.getKey() + (it.hasNext() ? ls : ""); //$NON-NLS-1$
- }*/
+ }
+ /**/
boolean performChange = true;
int res = 0;
- if (askConfirmation) {
- /** /
- final String outText2 = outText;
- MessageDialog dialog = new MessageDialog(JavaPlugin.getActiveWorkbenchShell(),
- JdtUiMessages.AllEntitiesProcessor_header, null,
- JdtUiMessages.AllEntitiesProcessor_message,
- MessageDialog.QUESTION,
- new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0) {
- protected Control createCustomArea(Composite parent) {
- Text messageText = new Text(parent, SWT.WRAP | SWT.V_SCROLL);
- messageText.setText(outText2);
- messageText.setEditable(false);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
- .grab(true, true)
- .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
- convertHorizontalDLUsToPixels(2 * IDialogConstants.BUTTON_BAR_HEIGHT)).applyTo(messageText);
-
- return messageText;
- }
- protected boolean isResizable() {
- return true;
- }
- };
- res = dialog.open();
- /**/
- }
if (res == 0) {
// TODO:
// show warning about abstract classes
@@ -202,29 +175,28 @@
// modify accepted items
if (getAnnotationStyle().equals(AnnotStyle.AUTO)) {
setAnnotationStyle(getAnnotationStylePreference());
- reCollectModification(bufferManager, entities);
+ reCollectModification(entities);
setAnnotationStyle(AnnotStyle.AUTO);
+ } else {
+ reCollectModification(entities);
}
- else {
- reCollectModification(bufferManager, entities);
- }
- }
- else {
+ } else {
performChange = false;
}
//
if (askConfirmation) {
- if (!showRefactoringDialog(entities, bufferManager)) {
+ if (!showRefactoringDialog(entities, selection2Update)) {
performChange = false;
}
}
if (performChange) {
- performCommit(entities, bufferManager);
+ performCommit(entities);
}
- performDisconnect(bufferManager);
+ performDisconnect();
}
- protected void performDisconnect(ITextFileBufferManager bufferManager) {
+ public void performDisconnect() {
+ final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
for (int i = 0; i < changes.size(); i++) {
ChangeStructure cs = changes.get(i);
try {
@@ -236,9 +208,9 @@
changes.clear();
}
- protected void performCommit(final Map<String, EntityInfo> entities,
- ITextFileBufferManager bufferManager) {
+ protected void performCommit(final Map<String, EntityInfo> entities) {
+ final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
for (int i = 0; i < changes.size(); i++) {
ChangeStructure cs = changes.get(i);
if (cs.textEdit != null && ((cs.change != null && cs.change.isEnabled()) || (cs.change == null))) {
@@ -261,10 +233,10 @@
}
}
- public void reCollectModification(ITextFileBufferManager bufferManager,
- Map<String, EntityInfo> entities) {
+ public void reCollectModification(Map<String, EntityInfo> entities) {
changes.clear();
+ final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
HashMap<IPath, EntityInfosCollection> modifications = new HashMap<IPath, EntityInfosCollection>();
Iterator<Map.Entry<String, EntityInfo>> it = entities.entrySet().iterator();
while (it.hasNext()) {
@@ -272,8 +244,13 @@
if (entry.getValue().isInterfaceFlag()) {
continue;
}
- final String fullyQualifiedName = entry.getKey();
+ final String javaProjectName = entry.getValue().getJavaProjectName();
+ final String fullyQualifiedName = entry.getValue().getFullyQualifiedName();
+ IJavaProject javaProject = Utils.findJavaProject(javaProjectName);
ICompilationUnit icu = Utils.findCompilationUnit(javaProject, fullyQualifiedName);
+ if (icu == null) {
+ continue;
+ }
org.eclipse.jdt.core.dom.CompilationUnit cu = Utils.getCompilationUnit(icu, true);
final IPath path = cu.getJavaElement().getPath();
EntityInfosCollection eiCollection = null;
@@ -335,31 +312,15 @@
}
public boolean showRefactoringDialog(final Map<String, EntityInfo> entities,
- final ITextFileBufferManager bufferManager) {
+ final IStructuredSelection selection2Update) {
- IHibernateJPAWizardData data = new IHibernateJPAWizardData() {
-
- public ITextFileBufferManager getBufferManager() {
- return bufferManager;
- }
-
- public Map<String, EntityInfo> getEntities() {
- return entities;
- }
-
- public ArrayList<ChangeStructure> getChanges() {
- return changes;
- }
-
- };
+ IHibernateJPAWizardData data =
+ HibernateJPAWizardDataFactory.createHibernateJPAWizardData(
+ entities, selection2Update, changes);
HibernateJPAWizard wizard = new HibernateJPAWizard(data, this);
return wizard.showWizard();
}
- protected void setJavaProject(IJavaProject project) {
- javaProject = project;
- }
-
public AnnotStyle getAnnotationStyle() {
return annotationStyle;
}
@@ -391,4 +352,8 @@
public void setEnableOptLock(boolean enableOptLock) {
this.enableOptLock = enableOptLock;
}
+
+ public ArrayList<ChangeStructure> getChanges() {
+ return changes;
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -31,6 +31,8 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
@@ -43,7 +45,11 @@
*/
@SuppressWarnings("restriction")
public class EntitiesList extends UserInputWizardPage {
+
+ protected final int COLUMN_CLASS = 0;
+ protected TableViewer listViewer;
+
protected IHibernateJPAWizardData data;
protected IHibernateJPAWizardParams params;
@@ -52,8 +58,31 @@
super(name);
this.data = data;
this.params = params;
+ setDescription(JdtUiMessages.EntitiesList_description);
}
+ public IStructuredContentProvider createContentProvider(final IHibernateJPAWizardData data) {
+ return new IStructuredContentProvider() {
+ public Object[] getElements(Object inputElement) {
+ return data.getEntities().values().toArray();
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ };
+ }
+
+ public void setData(final IHibernateJPAWizardData data) {
+ this.data = data;
+ if (listViewer != null) {
+ listViewer.setContentProvider(createContentProvider(data));
+ listViewer.setInput(data.getEntities());
+ }
+ }
+
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite container = new Composite(parent, SWT.NULL);
@@ -63,7 +92,7 @@
Label label = new Label(container, SWT.NULL);
label.setText(JdtUiMessages.AllEntitiesProcessor_message);
- TableViewer listViewer = new TableViewer(container, SWT.SINGLE | SWT.H_SCROLL
+ listViewer = new TableViewer(container, SWT.SINGLE | SWT.H_SCROLL
| SWT.V_SCROLL | SWT.BORDER);
//listViewer.setComparator(getViewerComparator());
Control control = listViewer.getControl();
@@ -71,21 +100,7 @@
| GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
gridData.heightHint = convertHeightInCharsToPixels(10);
control.setLayoutData(gridData);
- listViewer.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return data.getEntities().values().toArray();
- }
-
- public void dispose() {
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput,
- Object newInput) {
-
- }
- });
-
+ listViewer.setContentProvider(createContentProvider(data));
listViewer.setLabelProvider(new LabelProvider() {
private Image classImage;
@@ -113,6 +128,9 @@
});
listViewer.setInput(data.getEntities());
+ listViewer.getTable().setHeaderVisible(true);
+ listViewer.getTable().setLinesVisible(true);
+ createTableColumns(listViewer.getTable());
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
.grab(true, true)
.hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
@@ -146,15 +164,15 @@
int idx = ((Combo)e.getSource()).getSelectionIndex();
if (idx == 0 && !params.getAnnotationStyle().equals(AnnotStyle.FIELDS)) {
params.setAnnotationStyle(AnnotStyle.FIELDS);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
else if (idx == 1 && !params.getAnnotationStyle().equals(AnnotStyle.GETTERS)) {
params.setAnnotationStyle(AnnotStyle.GETTERS);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
else if (idx == 2 && !params.getAnnotationStyle().equals(AnnotStyle.AUTO)) {
params.setAnnotationStyle(params.getAnnotationStylePreference());
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
params.setAnnotationStyle(AnnotStyle.AUTO);
}
}
@@ -191,7 +209,7 @@
val = Integer.valueOf(str);
}
params.setDefaultStrLength(val);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
};
@@ -206,7 +224,7 @@
public void handleEvent(Event e) {
params.setEnableOptLock(((Button)e.widget).getSelection());
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
};
@@ -214,4 +232,12 @@
setControl(container);
}
+
+ protected void createTableColumns(Table table) {
+ TableColumn column = null;
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_CLASS);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Class);
+ column.setWidth(200);
+ }
}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TableItem;
+import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
+import org.hibernate.eclipse.jdt.ui.wizards.AddRemoveTableComposite;
+
+/**
+ * @author Vitali
+ */
+public class EntitiesSource extends UserInputWizardPage {
+
+ protected AddRemoveTableComposite addRemoveTableComposite;
+
+ protected IStructuredSelection selection;
+
+ public EntitiesSource(String name, IStructuredSelection selection) {
+ super(name);
+ this.selection = selection;
+ setDescription(JdtUiMessages.EntitiesSource_description);
+ }
+
+ public void createControl(Composite parent) {
+ addRemoveTableComposite = new AddRemoveTableComposite(parent, SWT.NONE) {
+ @Override
+ protected void handleButtonPressed(Button button) {
+ super.handleButtonPressed(button);
+ itemsChanged();
+ }
+ };
+ addRemoveTableComposite.getTableViewer().setInput(selection.toArray());
+ setControl(addRemoveTableComposite);
+ }
+
+ public IStructuredSelection getSelection() {
+ TableItem[] items = addRemoveTableComposite.getTableViewer().getTable().getItems();
+ Object[] data = new Object[items.length];
+ for (int i = 0; i < items.length; i++) {
+ data[i] = items[i].getData();
+ }
+ return new StructuredSelection(data);
+ }
+
+ protected void itemsChanged(){
+ getContainer().updateButtons();
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -12,11 +12,20 @@
import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
+import org.eclipse.jface.dialogs.IPageChangingListener;
+import org.eclipse.jface.dialogs.PageChangingEvent;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.hibernate.console.ImageConstants;
+import org.hibernate.eclipse.console.utils.EclipseImages;
import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
/**
@@ -25,7 +34,7 @@
* @author Vitali
*/
@SuppressWarnings("restriction")
-public class HibernateJPAWizard extends RefactoringWizard {
+public class HibernateJPAWizard extends RefactoringWizard implements IPageChangingListener {
protected final String wizard_title = JdtUiMessages.AllEntitiesProcessor_header;
@@ -37,14 +46,29 @@
super(new HibernateJPARefactoring(data.getChanges()), RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
this.data = data;
this.params = params;
+ setDefaultPageImageDescriptor(EclipseImages.getImageDescriptor(ImageConstants.NEW_WIZARD));
setWindowTitle(wizard_title);
setDefaultPageTitle(wizard_title);
}
@Override
protected void addUserInputPages() {
- UserInputWizardPage page = new EntitiesList(wizard_title, data, params);
- addPage(page);
+
+ IStructuredSelection selection = null;
+ if (data != null && data.getSelection2Update() != null) {
+ selection = data.getSelection2Update();
+ }
+ if (selection == null) {
+ selection = new StructuredSelection();
+ }
+ String title = JdtUiMessages.EntitiesSource_header;
+ EntitiesSource page0 = new EntitiesSource(title, selection);
+ addPage(page0);
+
+ title = JdtUiMessages.EntitiesList_header;
+ UserInputWizardPage page1 = new EntitiesList(title, data, params);
+ addPage(page1);
+ setDefaultPageTitle(page1.getName());
/** /
UserInputWizardPage page2 = new ResolveAmbiguous(wizard_title, data, params);
addPage(page2);
@@ -64,4 +88,42 @@
return res;
}
+ public IWizardPage getStartingPage() {
+ if (getPages().length <= 0) {
+ return null;
+ }
+ if (getPages().length == 1) {
+ return getPages()[0];
+ }
+ return getPages()[1];
+ }
+
+ @Override
+ public void setContainer(IWizardContainer wizardContainer) {
+ if (getContainer() instanceof WizardDialog) {
+ ((WizardDialog) getContainer()).removePageChangingListener(this);
+ }
+ super.setContainer(wizardContainer);
+ if (getContainer() instanceof WizardDialog) {
+ ((WizardDialog) getContainer()).addPageChangingListener(this);
+ }
+ }
+
+ public void handlePageChanging(PageChangingEvent event) {
+ Object currentPage = event.getCurrentPage();
+ Object targetPage = event.getTargetPage();
+ if (targetPage instanceof IWizardPage) {
+ setDefaultPageTitle(((IWizardPage)targetPage).getName());
+ }
+ if (currentPage instanceof EntitiesSource && targetPage instanceof EntitiesList){
+ EntitiesSource entitiesSource = (EntitiesSource)currentPage;
+ EntitiesList entitiesList = (EntitiesList)targetPage;
+ final IStructuredSelection selection = entitiesSource.getSelection();
+ IHibernateJPAWizardData data =
+ HibernateJPAWizardDataFactory.createHibernateJPAWizardData(selection,
+ params);
+ entitiesList.setData(data);
+ }
+ }
+
}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.CompilationUnitCollector;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.ChangeStructure;
+
+/**
+ * @author Vitali
+ */
+public class HibernateJPAWizardDataFactory {
+
+ static public IHibernateJPAWizardData createHibernateJPAWizardData(
+ final Map<String, EntityInfo> entities,
+ final IStructuredSelection selection2Update,
+ final ArrayList<ChangeStructure> changes) {
+
+ IHibernateJPAWizardData data = new IHibernateJPAWizardData() {
+
+ public Map<String, EntityInfo> getEntities() {
+ return entities;
+ }
+
+ public ArrayList<ChangeStructure> getChanges() {
+ return changes;
+ }
+
+ public IStructuredSelection getSelection2Update() {
+ return selection2Update;
+ }
+
+ };
+ return data;
+ }
+
+ @SuppressWarnings("unchecked")
+ static public IHibernateJPAWizardData createHibernateJPAWizardData(
+ final IStructuredSelection selection2Update, IHibernateJPAWizardParams params) {
+
+ CompilationUnitCollector compileUnitCollector = new CompilationUnitCollector();
+ Iterator itSelection2Update = selection2Update.iterator();
+ while (itSelection2Update.hasNext()) {
+ Object obj = itSelection2Update.next();
+ compileUnitCollector.processJavaElements(obj, true);
+ }
+ Iterator<ICompilationUnit> it = compileUnitCollector.setSelectionCUIterator();
+ AllEntitiesInfoCollector collector = new AllEntitiesInfoCollector();
+ collector.initCollector();
+ while (it.hasNext()) {
+ ICompilationUnit cu = it.next();
+ collector.collect(cu);
+ }
+ collector.resolveRelations();
+ final Map<String, EntityInfo> entities = collector.getMapCUs_Info();
+
+ params.performDisconnect();
+ params.reCollectModification(entities);
+
+ final ArrayList<ChangeStructure> changes = params.getChanges();
+
+ IHibernateJPAWizardData data = new IHibernateJPAWizardData() {
+
+ public Map<String, EntityInfo> getEntities() {
+ return entities;
+ }
+
+ public ArrayList<ChangeStructure> getChanges() {
+ return changes;
+ }
+
+ public IStructuredSelection getSelection2Update() {
+ return selection2Update;
+ }
+
+ };
+ return data;
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -13,7 +13,7 @@
import java.util.ArrayList;
import java.util.Map;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.ChangeStructure;
@@ -25,8 +25,8 @@
public interface IHibernateJPAWizardData {
public Map<String, EntityInfo> getEntities();
-
- public ITextFileBufferManager getBufferManager();
public ArrayList<ChangeStructure> getChanges();
+
+ public IStructuredSelection getSelection2Update();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -10,11 +10,12 @@
******************************************************************************/
package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+import java.util.ArrayList;
import java.util.Map;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AnnotStyle;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.ChangeStructure;
/**
* Hibernate JPA wizard input parameters interface
@@ -41,6 +42,9 @@
public AnnotStyle getAnnotationStylePreference();
- public void reCollectModification(ITextFileBufferManager bufferManager,
- Map<String, EntityInfo> entities);
+ public void reCollectModification(Map<String, EntityInfo> entities);
+
+ public void performDisconnect();
+
+ public ArrayList<ChangeStructure> getChanges();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -165,7 +165,7 @@
updateEditorOwner(ti);
updateTI(ti);
updateTI(ti2);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
}
}
@@ -238,7 +238,7 @@
updateEditorType(ti);
updateEditorOwner(ti);
updateTI(ti);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
}
}
@@ -292,7 +292,7 @@
updateEditorType(ti);
updateTI(ti);
updateTI(ti2);
- params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.reCollectModification(data.getEntities());
}
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -31,6 +31,8 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.hibernate.eclipse.console.wizards.UpDownListComposite;
@@ -60,6 +62,28 @@
TableColumn column = new TableColumn(table, SWT.NULL);
column.setWidth(350);
}
+
+ public void add(Object[] o, boolean notify) {
+ ArrayList<Object> arr = new ArrayList<Object>();
+ ArrayList<Object> arrSelItems = new ArrayList<Object>();
+ for (int i = 0; i < o.length; i++) {
+ Widget w = getTableViewer().testFindItem(o[i]);
+ if (w == null) {
+ arr.add(o[i]);
+ } else {
+ arrSelItems.add(w);
+ }
+ }
+ super.add(arr.toArray(), notify);
+ for (int i = 0; i < arr.size(); i++) {
+ Widget w = getTableViewer().testFindItem(arr.get(i));
+ if (w != null) {
+ arrSelItems.add(w);
+ }
+ }
+ getTableViewer().getTable().setSelection(arrSelItems.toArray(new TableItem[0]));
+ getTableViewer().setSelection(getTableViewer().getSelection(), false);
+ }
protected Object[] handleAdd(int i) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -115,7 +115,7 @@
entry = mapIt.next();
IJavaProject javaProject = entry.getKey();
Iterator<ICompilationUnit> setIt = entry.getValue().iterator();
- collector.initCollector(javaProject);
+ collector.initCollector();
while (setIt.hasNext()) {
ICompilationUnit icu = setIt.next();
collector.collect(icu);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -28,14 +28,11 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
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.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
@@ -358,7 +355,7 @@
entry = mapIt.next();
IJavaProject javaProject = entry.getKey();
Iterator<ICompilationUnit> setIt = entry.getValue().iterator();
- collector.initCollector(javaProject);
+ collector.initCollector();
while (setIt.hasNext()) {
ICompilationUnit icu = setIt.next();
collector.collect(icu);
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -18,6 +18,8 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.hibernate.eclipse.jdt.ui.internal.jpa.actions.JPAMapToolActor;
import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
@@ -35,6 +37,7 @@
*
* @author Vitali Yemialyanchyk
*/
+@SuppressWarnings("restriction")
public class JPAMapMockTests extends TestCase {
@@ -81,8 +84,9 @@
jpaMapToolActor.setAllEntitiesInfoCollector(allEntitiesInfoCollector);
jpaMapToolActor.setSelection(selection);
+ final IStructuredSelection selection2Update = new StructuredSelection();
context.checking(new Expectations() {{
- exactly(1).of(allEntitiesProcessor).modify(null, new HashMap<String, EntityInfo>(), true);
+ exactly(1).of(allEntitiesProcessor).modify(new HashMap<String, EntityInfo>(), true, selection2Update);
}});
jpaMapToolActor.updateSelected();
context.assertIsSatisfied();
@@ -98,7 +102,7 @@
inSequence(sequence);
will(returnValue(javaProject));
- allowing(allEntitiesInfoCollector).initCollector(javaProject);
+ allowing(allEntitiesInfoCollector).initCollector();
inSequence(sequence);
allowing(allEntitiesInfoCollector).collect(compilationUnit);
@@ -126,12 +130,14 @@
inSequence(sequence);
will(returnValue(null));
- allowing(allEntitiesProcessor).modify(javaProject, null, true);
+ allowing(allEntitiesProcessor).modify(null, true, null);
inSequence(sequence);
allowing(allEntitiesProcessor).savePreferences();
inSequence(sequence);
- }});
+
+ exactly(1).of(allEntitiesProcessor).modify(null, true, selection2Update);
+ }});
jpaMapToolActor.updateSelected();
context.assertIsSatisfied();
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-12-21 17:23:58 UTC (rev 19502)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-12-21 18:10:08 UTC (rev 19503)
@@ -46,6 +46,7 @@
*
* @author Vitali Yemialyanchyk
*/
+@SuppressWarnings("restriction")
public class JPAMapTest extends TestCase {
public static final String PROJECT_NAME = "TestProject"; //$NON-NLS-1$
@@ -128,7 +129,7 @@
assertNotNull(icu2);
assertNotNull(icu3);
assertNotNull(icu4);
- collector.initCollector(javaProject);
+ collector.initCollector();
collector.collect(icu);
collector.collect(icu2);
collector.collect(icu3);
@@ -138,7 +139,7 @@
}
collector.resolveRelations();
processor.setEnableOptLock(true);
- processor.modify(javaProject, collector.getMapCUs_Info(), false);
+ processor.modify(collector.getMapCUs_Info(), false, null);
//
checkItem("DocumentBase"); //$NON-NLS-1$
checkItem("Document"); //$NON-NLS-1$
15 years
JBoss Tools SVN: r19502 - trunk/bpel/plugins/org.eclipse.bpel.common.ui.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-21 12:23:58 -0500 (Mon, 21 Dec 2009)
New Revision: 19502
Modified:
trunk/bpel/plugins/org.eclipse.bpel.common.ui/build.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5517 add . to bin.includes; add output..=bin, etc
Modified: trunk/bpel/plugins/org.eclipse.bpel.common.ui/build.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.common.ui/build.properties 2009-12-21 17:01:09 UTC (rev 19501)
+++ trunk/bpel/plugins/org.eclipse.bpel.common.ui/build.properties 2009-12-21 17:23:58 UTC (rev 19502)
@@ -9,7 +9,8 @@
# IBM Corporation - initial API and implementation
# JBoss by Red Hat - subsequent contributions and maintenance
###############################################################################
-bin.includes = META-INF/,\
+bin.includes = .,\
+ META-INF/,\
plugin.xml,\
schema/,\
icons/,\
@@ -24,6 +25,6 @@
schema/,\
src/,\
plugin.properties
-output.code.jar = bin/
-jars.compile.order = bpel-ui.jar
+
source.. = src/
+output.. = bin/
15 years
JBoss Tools SVN: r19501 - branches/jbosstools-3.1.0.RC1/common/releng/hudson.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-21 12:01:09 -0500 (Mon, 21 Dec 2009)
New Revision: 19501
Modified:
branches/jbosstools-3.1.0.RC1/common/releng/hudson/run.sh
Log:
fix extra nested folder
Modified: branches/jbosstools-3.1.0.RC1/common/releng/hudson/run.sh
===================================================================
--- branches/jbosstools-3.1.0.RC1/common/releng/hudson/run.sh 2009-12-21 16:52:18 UTC (rev 19500)
+++ branches/jbosstools-3.1.0.RC1/common/releng/hudson/run.sh 2009-12-21 17:01:09 UTC (rev 19501)
@@ -56,6 +56,12 @@
cd $downloadsDir; wget --no-clobber http://repository.jboss.org/eclipse/galileo/org.eclipse.releng.basebuilde...
fi
cd $cvsProjectBaseDir; unzip -qq -d org.eclipse.releng.basebuilder $downloadsDir/org.eclipse.releng.basebuilder_${basebuilderBranch}.zip
+ # fix extra nested folder
+ if [[ -d $cvsProjectBaseDir/org.eclipse.releng.basebuilder/org.eclipse.releng.basebuilder ]]; then
+ mv $cvsProjectBaseDir/org.eclipse.releng.basebuilder $cvsProjectBaseDir/org.eclipse.releng.basebuilder_
+ mv $cvsProjectBaseDir/org.eclipse.releng.basebuilder_/org.eclipse.releng.basebuilder $cvsProjectBaseDir/
+ rm -fr $cvsProjectBaseDir/org.eclipse.releng.basebuilder_/
+ fi
# reuse cached copy if available
if [[ -f $thirdPartyJarsDir/org.eclipse.pde.build.svn-1.0.1RC2.zip ]]; then
15 years
JBoss Tools SVN: r19500 - trunk/bpel/plugins/org.eclipse.bpel.ui.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-21 11:52:18 -0500 (Mon, 21 Dec 2009)
New Revision: 19500
Removed:
trunk/bpel/plugins/org.eclipse.bpel.ui/.settings/
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/.classpath
trunk/bpel/plugins/org.eclipse.bpel.ui/build.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5517 fix missing classes in bpel.ui plugin
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/.classpath
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/.classpath 2009-12-21 15:30:02 UTC (rev 19499)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/.classpath 2009-12-21 16:52:18 UTC (rev 19500)
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/build.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/build.properties 2009-12-21 15:30:02 UTC (rev 19499)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/build.properties 2009-12-21 16:52:18 UTC (rev 19500)
@@ -9,32 +9,60 @@
# IBM Corporation - initial API and implementation
# JBoss by Red Hat - subsequent contributions and maintenance
###############################################################################
-bin.includes = META-INF/,\
- html/,
+bin.includes = .,\
+ META-INF/,\
+ html/,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
icons/,\
+ jboss_about.png,\
monkey/,\
+ plugin.properties,\
+ plugin.xml,\
schema/,\
schemas/,\
templates/,\
- jboss_about.png,\
- plugin.*,\
- uiextensionmodel.*,\
- .
+ uiextensionmodel.ecore,\
+ uiextensionmodel.genmodel
+ icons/,\
+ monkey/,\
+ schema/,\
+ schemas/,\
+ templates/,\
+ jboss_about.png
src.includes = .classpath,\
.cvsignore,\
.project,\
.settings/,\
build.*,\
src/,\
- META-INF/,\
- html/,
+ html/,\
+ uiextensionmodel.genmodel,\
+ uiextensionmodel.ecore,\
+ templates/,\
+ schemas/,\
+ schema/,\
+ plugin.xml,\
+ plugin.properties,\
+ monkey/,\
+ jboss_about.png,\
icons/,\
+ build.properties,\
+ about.properties,\
+ about.mappings,\
+ about.ini
+ icons/,\
monkey/,\
schema/,\
schemas/,\
templates/,\
- jboss_about.png,\
- plugin.*,\
- uiextensionmodel.*
-source.. = src/
-
+ jboss_about.png
+source.. = src/,\
+ templates/,\
+ schemas/,\
+ schema/,\
+ monkey/,\
+ html/
+output.. = bin/
+
\ No newline at end of file
15 years
JBoss Tools SVN: r19499 - trunk/bpel/releng/maps.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-21 10:30:02 -0500 (Mon, 21 Dec 2009)
New Revision: 19499
Modified:
trunk/bpel/releng/maps/mozilla.map
Log:
switch to XulRunner 1.9.1.2
Modified: trunk/bpel/releng/maps/mozilla.map
===================================================================
--- trunk/bpel/releng/maps/mozilla.map 2009-12-21 15:09:57 UTC (rev 19498)
+++ trunk/bpel/releng/maps/mozilla.map 2009-12-21 15:30:02 UTC (rev 19499)
@@ -1,9 +1,11 @@
-!*** from http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/co...
+!*** from http://repository.jboss.com/xulrunner/
-feature@org.mozilla.xpcom.feature,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/features/org.mozilla.xpcom.feature_1.8.1.3-20080312.jar
-plugin@org.mozilla.xpcom,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/plugins/org.mozilla.xpcom_1.8.1.3-20080312.jar
+feature@org.mozilla.xpcom.feature,1.9.1.0_v20090825-1855-27801aw311A193502411=GET,http://repository.jboss.com/xulrunner/org.mozilla.xpcom.feature_1.9.1.0_v20090825-1855-27801aw311A193502411.jar
+plugin@org.mozilla.xpcom,1.9.1.2a=GET,http://repository.jboss.com/xulrunner/org.mozilla.xpcom_1.9.1.2a.jar
-feature@org.mozilla.xulrunner.feature,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/features/org.mozilla.xulrunner.feature_1.8.1.3-20080312.jar
-plugin@org.mozilla.xulrunner.carbon.macosx,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/plugins/org.mozilla.xulrunner.carbon.macosx_1.8.1.3-20080312.jar
-plugin@org.mozilla.xulrunner.win32.win32.x86,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/plugins/org.mozilla.xulrunner.win32.win32.x86_1.8.1.3-20080312.jar
-plugin@org.mozilla.xulrunner.gtk.linux,1.8.1.3-20080312=GET,http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.8.1.3-20080312.jar
\ No newline at end of file
+feature@org.mozilla.xulrunner.feature,1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.feature_1.9.1.0_v20090825-1855-57Z379OhF77g7cFR37gN7.jar
+plugin@org.mozilla.xulrunner.win32.win32.x86,1.9.1.2=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.win32.win32.x86_1.9.1.2.jar
+plugin@org.mozilla.xulrunner.gtk.linux,1.9.1.2=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.gtk.linux.x86_1.9.1.2.jar
+plugin@org.mozilla.xulrunner.gtk.linux.x86_64,1.9.1.2=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.gtk.linux.x86_64_1.9.1.2.jar
+plugin@org.mozilla.xulrunner.carbon.macosx,1.9.1.2=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.carbon.macosx_1.9.1.2.jar
+plugin@org.mozilla.xulrunner.cocoa.macosx,1.9.1.2=GET,http://repository.jboss.com/xulrunner/org.mozilla.xulrunner.cocoa.macosx_1.9.1.2.jar
15 years
JBoss Tools SVN: r19498 - trunk/jbpm/features/org.jboss.tools.jbpm4.sdk.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-21 10:09:57 -0500 (Mon, 21 Dec 2009)
New Revision: 19498
Modified:
trunk/jbpm/features/org.jboss.tools.jbpm4.sdk.feature/build.properties
Log:
remove org.jboss.tools.jbpm.common.feature
Modified: trunk/jbpm/features/org.jboss.tools.jbpm4.sdk.feature/build.properties
===================================================================
--- trunk/jbpm/features/org.jboss.tools.jbpm4.sdk.feature/build.properties 2009-12-21 14:42:40 UTC (rev 19497)
+++ trunk/jbpm/features/org.jboss.tools.jbpm4.sdk.feature/build.properties 2009-12-21 15:09:57 UTC (rev 19498)
@@ -3,6 +3,5 @@
generate.feature(a)org.jboss.tools.flow.jpdl4.source.feature=org.jboss.tools.flow.jpdl4.feature
generate.feature(a)org.jboss.tools.flow.common.source.feature=org.jboss.tools.flow.common.feature
-generate.feature(a)org.jboss.tools.jbpm.common.source.feature=org.jboss.tools.jbpm.common.feature
generate.feature(a)org.jboss.tools.jbpm.convert.source.feature=org.jboss.tools.jbpm.convert.feature
generate.feature(a)org.jbpm.gd.jpdl.source.feature=org.jbpm.gd.jpdl.feature
15 years