JBoss Tools SVN: r29179 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-16 11:59:29 -0500 (Wed, 16 Feb 2011)
New Revision: 29179
Modified:
trunk/build/target-platform/multiple.target
trunk/build/target-platform/multiple.target.p2mirror.xml
trunk/build/target-platform/unified.target
trunk/build/target-platform/unified.target.p2mirror.xml
Log:
bump up to latest GWT 2.2.0.v201102111811 release
Modified: trunk/build/target-platform/multiple.target
===================================================================
--- trunk/build/target-platform/multiple.target 2011-02-16 16:00:30 UTC (rev 29178)
+++ trunk/build/target-platform/multiple.target 2011-02-16 16:59:29 UTC (rev 29179)
@@ -220,8 +220,8 @@
<repository location="http://download.jboss.org/jbosstools/builds/staging/_composite_/trunk/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="1.4.2.v201012211742"/>
- <unit id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.1.1.feature.group" version="2.1.1.v201012170127"/>
+ <unit version="2.2.0.v201102111811" id="com.google.gdt.eclipse.suite.e36.feature.feature.group"/>
+ <unit version="2.2.0.v201102111811" id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group"/>
<repository location="http://dl.google.com/eclipse/plugin/3.6/"/>
</location>
Modified: trunk/build/target-platform/multiple.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/multiple.target.p2mirror.xml 2011-02-16 16:00:30 UTC (rev 29178)
+++ trunk/build/target-platform/multiple.target.p2mirror.xml 2011-02-16 16:59:29 UTC (rev 29179)
@@ -180,7 +180,7 @@
<iu id="org.eclipse.wst.ws_ui.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.xml_core.feature.feature.group" version=""/>
<iu id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version=""/>
-<iu id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.1.1.feature.group" version=""/>
+<iu id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group" version=""/>
<iu id="org.drools.eclipse.feature.feature.group" version=""/>
<iu id="org.drools.eclipse.task.feature.feature.group" version=""/>
<iu id="org.guvnor.tools.feature.feature.group" version=""/>
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2011-02-16 16:00:30 UTC (rev 29178)
+++ trunk/build/target-platform/unified.target 2011-02-16 16:59:29 UTC (rev 29179)
@@ -220,8 +220,8 @@
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="1.4.2.v201012211742"/>
- <unit id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.1.1.feature.group" version="2.1.1.v201012170127"/>
+ <unit version="2.2.0.v201102111811" id="com.google.gdt.eclipse.suite.e36.feature.feature.group"/>
+ <unit version="2.2.0.v201102111811" id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group"/>
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
Modified: trunk/build/target-platform/unified.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/unified.target.p2mirror.xml 2011-02-16 16:00:30 UTC (rev 29178)
+++ trunk/build/target-platform/unified.target.p2mirror.xml 2011-02-16 16:59:29 UTC (rev 29179)
@@ -180,7 +180,7 @@
<iu id="org.eclipse.wst.ws_ui.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.xml_core.feature.feature.group" version=""/>
<iu id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version=""/>
-<iu id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.1.1.feature.group" version=""/>
+<iu id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group" version=""/>
<iu id="org.drools.eclipse.feature.feature.group" version=""/>
<iu id="org.drools.eclipse.task.feature.feature.group" version=""/>
<iu id="org.guvnor.tools.feature.feature.group" version=""/>
14 years, 10 months
JBoss Tools SVN: r29178 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-02-16 11:00:30 -0500 (Wed, 16 Feb 2011)
New Revision: 29178
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-8436
validation and completion proposals moved to generator container
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java 2011-02-16 15:27:21 UTC (rev 29177)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java 2011-02-16 16:00:30 UTC (rev 29178)
@@ -12,7 +12,6 @@
import java.util.Iterator;
import java.util.List;
-import java.util.ListIterator;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.context.BaseJoinColumn;
@@ -29,7 +28,6 @@
import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.utility.TextRange;
-import org.eclipse.jpt.utility.Filter;
import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
@@ -264,17 +262,9 @@
@Override
public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
super.validate(messages, reporter, astRoot);
- this.validateGenericGenerator(messages, reporter, astRoot);
this.validateForeignKey(messages, astRoot);
}
- protected void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- ListIterator<JavaGenericGenerator> genericGenerators = getGeneratorContainer().genericGenerators();
- while (genericGenerators.hasNext()) {
- genericGenerators.next().validate(messages, reporter, astRoot);
- }
- }
-
protected void validateForeignKey(List<IMessage> messages, CompilationUnit astRoot) {
org.eclipse.jpt.db.Table table = getForeignKeyDbTable();
if (!shouldValidateAgainstDatabase() || foreignKey == null || table == null ){
@@ -297,24 +287,6 @@
messages.add(message);
}
- @Override
- public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
- CompilationUnit astRoot) {
- Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- ListIterator<JavaGenericGenerator> genericGenerators = getGeneratorContainer().genericGenerators();
- while (genericGenerators.hasNext()) {
- result = genericGenerators.next()
- .javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
/*protected String getResourceDefaultName() {
NamingStrategy ns = getJpaProject().getNamingStrategy();
if (getJpaProject().isNamingStrategyEnabled() && ns != null){
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java 2011-02-16 15:27:21 UTC (rev 29177)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java 2011-02-16 16:00:30 UTC (rev 29178)
@@ -15,13 +15,17 @@
import java.util.List;
import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.context.java.JavaGenerator;
import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaGeneratorContainer;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.utility.Filter;
import org.eclipse.jpt.utility.internal.CollectionTools;
import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateAbstractJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
@@ -148,6 +152,44 @@
addGenericGenerator(buildGenericGenerator((GenericGeneratorAnnotation) resourceGenericGenerators.next()));
}
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaGeneratorContainer#validate(java.util.List, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter,
+ CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ this.validateGenericGenerators(messages, reporter, astRoot);
+ }
+ protected void validateGenericGenerators(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ ListIterator<JavaGenericGenerator> genericGenerators = genericGenerators();
+ while (genericGenerators.hasNext()) {
+ genericGenerators.next().validate(messages, reporter, astRoot);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaGeneratorContainer#javaCompletionProposals(int, org.eclipse.jpt.utility.Filter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
+ @Override
+ public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
+ CompilationUnit astRoot) {
+ Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+ if (result != null) {
+ return result;
+ }
+ ListIterator<JavaGenericGenerator> genericGenerators = genericGenerators();
+ while (genericGenerators.hasNext()) {
+ result = genericGenerators.next()
+ .javaCompletionProposals(pos, filter, astRoot);
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java 2011-02-16 15:27:21 UTC (rev 29177)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java 2011-02-16 16:00:30 UTC (rev 29178)
@@ -16,7 +16,6 @@
import org.eclipse.jpt.core.internal.context.java.AbstractJavaIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateAbstractJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotation;
/**
@@ -26,8 +25,6 @@
public class HibernateJavaIdMappingImpl extends AbstractJavaIdMapping
implements HibernateJavaIdMapping {
- protected JavaGenericGenerator genericGenerator;
-
protected JavaIndex index;
/**
@@ -75,133 +72,6 @@
return this.getColumn().getDBColumnName();
}
- protected void initializeGenericGenerator() {
- GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
- if (genericGeneratorResource != null) {
- this.genericGenerator = buildGenericGenerator(genericGeneratorResource);
- }
- }
-
- protected GenericGeneratorAnnotation getResourceGenericGenerator() {
- return (GenericGeneratorAnnotation) this.getResourcePersistentAttribute().getAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- protected JavaGenericGenerator buildGenericGenerator(GenericGeneratorAnnotation genericGeneratorResource) {
- JavaGenericGenerator generator = ((HibernateAbstractJpaFactory) getJpaFactory()).buildJavaGenericGenerator(this);
- generator.initialize(genericGeneratorResource);
- return generator;
- }
-
- /*@SuppressWarnings("unchecked")
- public Iterator<JavaGenerator> generators() {
- return new CompositeIterator<JavaGenerator>(super.generators(),
- (getGenericGenerator() == null) ? EmptyIterator.instance()
- : new SingleElementIterator(getGenericGenerator()));
- }
-
- public JavaGenericGenerator addGenericGenerator(int index) {
- if (getGenericGenerator() != null) {
- throw new IllegalStateException("genericGenerator already exists"); //$NON-NLS-1$
- }
- this.genericGenerator = ((HibernateJpaFactory)getJpaFactory()).buildJavaGenericGenerator(this);
- GenericGeneratorAnnotation genericGeneratorResource = (GenericGeneratorAnnotation)getResourcePersistentAttribute()
- .addAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- this.genericGenerator.initialize(genericGeneratorResource);
- firePropertyChanged(GENERIC_GENERATORS_LIST, null, this.genericGenerator);
- return this.genericGenerator;
- }
-
- private JavaGenericGenerator getGenericGenerator() {
- return genericGenerator;
- }
-
- private void removeGenericGenerator() {
- if (getGenericGenerator() == null) {
- throw new IllegalStateException("genericGenerator does not exist, cannot be removed"); //$NON-NLS-1$
- }
- JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
- this.genericGenerator = null;
- this.getResourcePersistentAttribute().removeAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator,null);
- }
-
- private void setGenericGenerator(JavaGenericGenerator newGenericGenerator) {
- JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
- this.genericGenerator = newGenericGenerator;
- firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator, newGenericGenerator);
- }
-
- protected void updateGenericGenerator() {
- GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
- if (genericGeneratorResource == null) {
- if (getGenericGenerator() != null) {
- setGenericGenerator(null);
- }
- }
- else {
- if (getGenericGenerator() == null) {
- setGenericGenerator(buildGenericGenerator(genericGeneratorResource));
- }
- else {
- getGenericGenerator().update(genericGeneratorResource);
- }
- }
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- validateGenericGenerator(messages, reporter, astRoot);
- }
-
- private void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (genericGenerator != null){
- genericGenerator.validate(messages, reporter, astRoot);
- }
- }
-
- @Override
- public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
- CompilationUnit astRoot) {
- Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.getGenericGenerator() != null) {
- result = this.getGenericGenerator().javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- public ListIterator<GenericGenerator> genericGenerators() {
- return genericGenerator == null ? EmptyListIterator.<GenericGenerator>instance()
- : new SingleElementListIterator<GenericGenerator>(genericGenerator);
- }
-
- public int genericGeneratorsSize() {
- return genericGenerator == null ? 0 : 1;
- }
-
- public void moveGenericGenerator(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeGenericGenerator(int index) {
- if (genericGeneratorsSize() < index + 1){
- throw new IndexOutOfBoundsException();
- }
- removeGenericGenerator();
- }
-
- public void removeGenericGenerator(GenericGenerator generator) {
- if (this.genericGenerator == generator){
- removeGenericGenerator();
- }
- }*/
-
// *** index
protected void initializeIndex() {
14 years, 10 months
JBoss Tools SVN: r29177 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-02-16 10:27:21 -0500 (Wed, 16 Feb 2011)
New Revision: 29177
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIPerspectiveFactory.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-8270: Created CDI Perspective.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-02-16 15:10:30 UTC (rev 29176)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-02-16 15:27:21 UTC (rev 29177)
@@ -29,7 +29,10 @@
org.eclipse.core.expressions,
org.eclipse.ltk.core.refactoring,
org.jboss.tools.jst.jsp,
- org.eclipse.wst.common.project.facet.ui
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.debug.ui,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator.resources
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2011-02-16 15:10:30 UTC (rev 29176)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2011-02-16 15:27:21 UTC (rev 29177)
@@ -17,3 +17,5 @@
NewWizards.file=File beans.xml
NewWizards.file.description=Create a new beans.xml File
+
+perspective.name=Context and Dependency Injection (CDI)
\ 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 2011-02-16 15:10:30 UTC (rev 29176)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2011-02-16 15:27:21 UTC (rev 29177)
@@ -281,8 +281,7 @@
<keyword
label="%preferenceKeywords.newBeansXML"
id="org.jboss.tools.cdi.ui.newBeansXML"/>
-
- </extension>
+ </extension>
<extension
point="org.eclipse.wst.common.project.facet.ui.wizardPages">
@@ -291,7 +290,71 @@
</wizard-pages>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.jboss.tools.cdi.ui.CDIPerspectiveFactory"
+ icon="$nl$/icons/cdi16.png"
+ id="org.jboss.tools.cdi.ui.CDIPerspective"
+ name="%perspective.name">
+ </perspective>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.jboss.tools.cdi.ui.CDIPerspective">
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewBeanCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewQualifierCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewScopeCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewInterceptorBindingCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewInterceptorCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewDecoratorCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralCreationWizard">
+ </newWizardShortcut>
+ <newWizardShortcut
+ id="org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard">
+ </newWizardShortcut>
+ <actionSet id="org.hibernate.eclipse.launch.actionset"/>
+ <perspectiveShortcut
+ id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
+ </perspectiveShortcut>
+ <perspectiveShortcut
+ id="org.eclipse.jdt.ui.JavaPerspective">
+ </perspectiveShortcut>
+ <perspectiveShortcut
+ id="org.eclipse.jdt.ui.JavaBrowsingPerspective">
+ </perspectiveShortcut>
+ <perspectiveShortcut
+ id="org.eclipse.debug.ui.DebugPerspective">
+ </perspectiveShortcut>
+ <perspectiveShortcut
+ id="org.hibernate.eclipse.console.HibernateConsolePerspective">
+ </perspectiveShortcut>
+ <actionSet
+ id="org.eclipse.debug.ui.breakpointActionSet">
+ </actionSet>
+ <actionSet id="org.eclipse.wst.server.ui.internal.webbrowser.actionSet"/>
+ </perspectiveExtension>
+ </extension>
+
+ <extension
point="org.eclipse.wst.sse.ui.completionProposal">
<proposalCategory
icon="icons/cdi16.png"
@@ -319,5 +382,5 @@
markerType="org.jboss.tools.cdi.core.cdiproblem"
class="org.jboss.tools.cdi.ui.marker.CDIProblemMarkerResolutionGenerator"/>
</extension>
-
+
</plugin>
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIPerspectiveFactory.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIPerspectiveFactory.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIPerspectiveFactory.java 2011-02-16 15:27:21 UTC (rev 29177)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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;
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.navigator.resources.ProjectExplorer;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIPerspectiveFactory implements IPerspectiveFactory {
+
+ private static String WTP_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
+
+ public static final String PERSPECTIVE_ID = "org.jboss.tools.cdi.ui.CDIPerspective"; //$NON-NLS-1$
+
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+
+ IFolderLayout leftTop = layout.createFolder("leftTop", IPageLayout.LEFT, (float)0.2, editorArea); //$NON-NLS-1$
+ leftTop.addView(JavaUI.ID_PACKAGES);
+ leftTop.addView(ProjectExplorer.VIEW_ID);
+ leftTop.addPlaceholder(IPageLayout.ID_RES_NAV);
+
+ IFolderLayout leftBottom = layout.createFolder("leftBottom", IPageLayout.BOTTOM, 0.64f, "leftTop"); //$NON-NLS-1$ //$NON-NLS-2$
+ //leftBottom.addView(IPageLayout.ID_OUTLINE);
+ leftBottom.addView(IPageLayout.ID_PROP_SHEET);
+
+ IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.78, editorArea); //$NON-NLS-1$
+ bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
+ bottom.addView(IPageLayout.ID_TASK_LIST);
+ bottom.addView(WTP_SERVERS_VIEW);
+
+ IFolderLayout rightTop = layout.createFolder("right", IPageLayout.RIGHT, (float)0.8, editorArea); //$NON-NLS-1$
+// rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView"); //$NON-NLS-1$
+ rightTop.addView("org.eclipse.gef.ui.palette_view"); //$NON-NLS-1$
+ IFolderLayout rightBottom = layout.createFolder("rightBottom", IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$ //$NON-NLS-2$
+ rightBottom.addView(IPageLayout.ID_OUTLINE);
+
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
+ layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
+
+ // views - java
+ layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
+ layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
+ layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);
+
+ // views - standard workbench
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+
+ // new actions - Java project creation wizard
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIPerspectiveFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-02-16 15:10:30 UTC (rev 29176)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-02-16 15:27:21 UTC (rev 29177)
@@ -10,15 +10,16 @@
******************************************************************************/
package org.jboss.tools.cdi.ui.test;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.cdi.ui.test.marker.CDIMarkerResolutionTest;
+import org.jboss.tools.cdi.ui.test.perspective.CDIPerspectiveTest;
import org.jboss.tools.cdi.ui.test.preferences.CDIPreferencePageTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIClassWizardFactoryTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
/**
* @author Alexey Kazakov
*/
@@ -27,14 +28,15 @@
public static Test suite() {
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
-
+
TestSuite suite = new TestSuite("CDI UI Tests");
suite.addTestSuite(CDIMarkerResolutionTest.class);
suite.addTestSuite(CATest.class);
suite.addTestSuite(NewCDIWizardTest.class);
suite.addTestSuite(CDIPreferencePageTest.class);
suite.addTestSuite(NewCDIClassWizardFactoryTest.class);
-
+ suite.addTestSuite(CDIPerspectiveTest.class);
+
return suite;
}
}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java 2011-02-16 15:27:21 UTC (rev 29177)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.perspective;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.WorkbenchException;
+import org.jboss.tools.cdi.ui.CDIPerspectiveFactory;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIPerspectiveTest extends TestCase {
+
+ public void testPerspective() throws WorkbenchException {
+ IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(CDIPerspectiveFactory.PERSPECTIVE_ID, null);
+ assertNotNull(page);
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 10 months
JBoss Tools SVN: r29176 - in trunk: runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-02-16 10:10:30 -0500 (Wed, 16 Feb 2011)
New Revision: 29176
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
Log:
JBIDE-8344 Runtime detection creates invalid runtime for EAP 4.3.0.GA_CP03
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java 2011-02-16 14:39:55 UTC (rev 29175)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java 2011-02-16 15:10:30 UTC (rev 29176)
@@ -11,6 +11,11 @@
package org.jboss.ide.eclipse.as.core.server.bean;
import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
@@ -49,6 +54,12 @@
BIN_PATH+File.separatorChar + TWIDDLE_JAR_NAME,
new String[]{V6_0,V5_1, V5_0, V4_2, V4_0, V3_2}, new ASServerTypeCondition());
+ public static final JBossServerType EAP_STD = new JBossServerType(
+ "EAP_STD",//$NON-NLS-1$
+ "Enterprise Application Platform",//$NON-NLS-1$
+ BIN_PATH+ File.separatorChar + TWIDDLE_JAR_NAME,
+ new String[]{V4_2,V4_3,V5_0,V5_1}, new EAPStandaloneServerTypeCondition());
+
public static final JBossServerType EAP = new JBossServerType(
"EAP",//$NON-NLS-1$
"Enterprise Application Platform",//$NON-NLS-1$
@@ -123,6 +134,31 @@
return this.condition.isServerRoot(location);
}
+ public static boolean isEAP(File systemJarFile) {
+ if (systemJarFile.canRead()) {
+ ZipFile jar = null;
+ try {
+ jar = new ZipFile(systemJarFile);
+ ZipEntry manifest = jar.getEntry("META-INF/MANIFEST.MF");//$NON-NLS-1$
+ Properties props = new Properties();
+ props.load(jar.getInputStream(manifest));
+ String title = (String) props.get("Implementation-Title");//$NON-NLS-1$
+ return title != null && title.contains("EAP"); //$NON-NLS-1$
+ } catch (IOException e) {
+ // ignore
+ } finally {
+ if (jar != null) {
+ try {
+ jar.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+ return false;
+ }
+
public static final JBossServerType[] KNOWN_TYPES = {AS, EAP, SOAP, SOAP_STD, EWP, EPP};
static interface Condition {
@@ -137,11 +173,24 @@
}
}
+ public static class EAPStandaloneServerTypeCondition implements Condition {
+ public boolean isServerRoot(File location) {
+ File asSystemJar = new File(location, JBossServerType.EAP_STD.getSystemJarPath());
+ if (asSystemJar.exists() && asSystemJar.isFile()) {
+ return isEAP(asSystemJar);
+ }
+ return false;
+ }
+ }
+
public static class ASServerTypeCondition implements Condition {
public boolean isServerRoot(File location) {
File asSystemJar = new File(location, JBossServerType.AS.getSystemJarPath());
- return asSystemJar.exists() && asSystemJar.isFile();
+ if (asSystemJar.exists() && asSystemJar.isFile()) {
+ return !isEAP(asSystemJar);
+ }
+ return false;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java 2011-02-16 14:39:55 UTC (rev 29175)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java 2011-02-16 15:10:30 UTC (rev 29176)
@@ -35,6 +35,8 @@
public JBossServerType getServerType(File location) {
if(JBossServerType.AS.isServerRoot(location)) {
return JBossServerType.AS;
+ } else if(JBossServerType.EAP_STD.isServerRoot(location)) {
+ return JBossServerType.EAP_STD;
} else if(JBossServerType.EAP.isServerRoot(location) && JBossServerType.SOAP.isServerRoot(location)) {
return JBossServerType.SOAP;
} else if(JBossServerType.SOAP_STD.isServerRoot(location)) {
@@ -55,15 +57,24 @@
public String getFullServerVersion(File systemJarFile) {
String version = null;
+ ZipFile jar = null;
if(systemJarFile.canRead()) {
try {
- ZipFile jar = new ZipFile(systemJarFile);
+ jar = new ZipFile(systemJarFile);
ZipEntry manifest = jar.getEntry("META-INF/MANIFEST.MF");//$NON-NLS-1$
Properties props = new Properties();
props.load(jar.getInputStream(manifest));
version = (String)props.get("Specification-Version");//$NON-NLS-1$
} catch (IOException e) {
// version = ""
+ } finally {
+ if (jar != null) {
+ try {
+ jar.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
}
}
return version;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java 2011-02-16 14:39:55 UTC (rev 29175)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/IJBossRuntimePluginConstants.java 2011-02-16 15:10:30 UTC (rev 29176)
@@ -14,6 +14,7 @@
public static final String DEFAULT_DS = "DefaultDS";
public static final String RUNTIME = Messages.JBossRuntimeStartup_Runtime;
public static final String EAP = "EAP"; //$NON-NLS-1$
+ public static final String EAP_STD = "EAP_STD"; //$NON-NLS-1$
public static final String SOA_P = "SOA-P"; //$NON-NLS-1$
public static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
public static final String EPP = "EPP"; //$NON-NLS-1$
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2011-02-16 14:39:55 UTC (rev 29175)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2011-02-16 15:10:30 UTC (rev 29176)
@@ -98,7 +98,7 @@
if(EWP.equals(type)) {
return new File(serverDefinition.getLocation(),"jboss-as-web"); //$NON-NLS-1$
}
- if (AS.equals(type)) {
+ if (AS.equals(type) || EAP_STD.equals(type)) {
return serverDefinition.getLocation();
}
return null;
@@ -115,7 +115,8 @@
}
String type = serverDefinition.getType();
if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type)
- || SOA_P_STD.equals(type) || EWP.equals(type)) {
+ || SOA_P_STD.equals(type) || EWP.equals(type)
+ || EAP_STD.equals(type)) {
String name = serverDefinition.getName();
String runtimeName = name + " " + RUNTIME; //$NON-NLS-1$
int index = getJBossASVersion(asLocation);
14 years, 10 months
JBoss Tools SVN: r29175 - in trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge: runtime and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-02-16 09:39:55 -0500 (Wed, 16 Feb 2011)
New Revision: 29175
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartitioner.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/runtime/Manager.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleViewer.java
Log:
history through up and down arrow keys is working
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartitioner.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartitioner.java 2011-02-16 14:17:24 UTC (rev 29174)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartitioner.java 2011-02-16 14:39:55 UTC (rev 29175)
@@ -10,60 +10,59 @@
@Override
public void connect(IDocument document) {
+// System.out.println("connect");
document.setDocumentPartitioner(this);
}
@Override
public void disconnect() {
- // TODO Auto-generated method stub
-
+// System.out.println("disconnect");
}
@Override
public void documentAboutToBeChanged(DocumentEvent event) {
- // TODO Auto-generated method stub
-
+// System.out.println("documentAboutToBeChanged");
}
@Override
public boolean documentChanged(DocumentEvent event) {
- // TODO Auto-generated method stub
+// System.out.println("documentChanged");
return false;
}
@Override
public String[] getLegalContentTypes() {
- // TODO Auto-generated method stub
+// System.out.println("getLegalContentTypes");
return null;
}
@Override
public String getContentType(int offset) {
- // TODO Auto-generated method stub
+// System.out.println("getContentType");
return null;
}
@Override
public ITypedRegion[] computePartitioning(int offset, int length) {
- // TODO Auto-generated method stub
+// System.out.println("computePartitioning");
return null;
}
@Override
public ITypedRegion getPartition(int offset) {
- // TODO Auto-generated method stub
+// System.out.println("getPartition");
return null;
}
@Override
public boolean isReadOnly(int offset) {
- // TODO Auto-generated method stub
+// System.out.println("isReadOnly");
return false;
}
@Override
public StyleRange[] getStyleRanges(int offset, int length) {
- // TODO Auto-generated method stub
+ System.out.println("getStyleRanges : [offset, " + offset + "] [length, " + length + "]");
return null;
}
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/runtime/Manager.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/runtime/Manager.java 2011-02-16 14:17:24 UTC (rev 29174)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/runtime/Manager.java 2011-02-16 14:39:55 UTC (rev 29175)
@@ -107,6 +107,7 @@
IPath path = root.getLocation();
File workingDir = path.toFile();
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, workingDir.getAbsolutePath());
+// workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "-Dseam.forge.shell.colorEnabled=true");
ILaunchConfiguration configuration = workingCopy.doSave();
ILaunch launch = configuration.launch(ILaunchManager.RUN_MODE, null, false, false);
IProcess[] processes = launch.getProcesses();
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleViewer.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleViewer.java 2011-02-16 14:17:24 UTC (rev 29174)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleViewer.java 2011-02-16 14:39:55 UTC (rev 29175)
@@ -14,9 +14,9 @@
public class ConsoleViewer extends TextConsoleViewer {
- private static String BACKSPACE = new String(new byte[] {'\b'});
-// private static String UP_ARROW = new String(new byte[] { 0x1b, 0x5b, 0x41 });
-// private static String DOWN_ARROW = new String(new byte[] { 0x1b, 0x5b, 0x42 });
+ private static String BACKSPACE = new Character('b').toString();
+ private static String UP_ARROW = new Character((char)16).toString();
+ private static String DOWN_ARROW = new Character((char)14).toString();
private Console console = null;
@@ -36,13 +36,11 @@
}
private void handleArrowUp() {
-// System.out.println("handle arrow up");
-// console.getInputStream().appendData(UP_ARROW);
+ console.getInputStream().appendData(UP_ARROW);
}
private void handleArrowDown() {
-// System.out.println("handle arrow down");
-// console.getInputStream().appendData(DOWN_ARROW);
+ console.getInputStream().appendData(DOWN_ARROW);
}
protected StyledText createTextWidget(Composite parent, int styles) {
14 years, 10 months
JBoss Tools SVN: r29174 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-02-16 09:17:24 -0500 (Wed, 16 Feb 2011)
New Revision: 29174
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
Log:
https://issues.jboss.org/browse/JBIDE-6267 , getProject() method was added to the JSPMPE.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2011-02-16 11:57:13 UTC (rev 29173)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2011-02-16 14:17:24 UTC (rev 29174)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
@@ -874,6 +875,15 @@
public int getVisualSourceIndex() {
return visualSourceIndex;
}
+
+ public IProject getProject() {
+ IProject pr = null;
+ IFile file = getFile();
+ if (null != file) {
+ pr = file.getProject();
+ }
+ return pr;
+ }
class ResourceChangeListener implements IResourceChangeListener {
IEditorPart editorPart;
14 years, 10 months
JBoss Tools SVN: r29173 - in trunk/jsf/plugins/org.jboss.tools.jsf: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-02-16 06:57:13 -0500 (Wed, 16 Feb 2011)
New Revision: 29173
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAction.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeContributionItem.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-6267 , base functionality was created.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2011-02-16 10:33:04 UTC (rev 29172)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2011-02-16 11:57:13 UTC (rev 29173)
@@ -61,7 +61,8 @@
org.eclipse.ltk.ui.refactoring,
org.eclipse.core.expressions;bundle-version="3.4.100",
org.jboss.tools.common.text.ext;bundle-version="3.1.0",
- org.eclipse.jst.jsp.ui;visibility:=reexport
+ org.eclipse.jst.jsp.ui;visibility:=reexport,
+ org.jboss.tools.jst.jsp;bundle-version="3.2.0"
Bundle-Version: 3.2.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-02-16 10:33:04 UTC (rev 29172)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-02-16 11:57:13 UTC (rev 29173)
@@ -773,6 +773,20 @@
</visibleWhen>
</command>
</menuContribution>
+ <menuContribution
+ locationURI="popup:org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor.source.EditorContext?after=org.jboss.tools.jst.jsp.i18n.ExternalizeStringsContributionItem">
+ <dynamic
+ class="org.jboss.tools.jsf.web.validation.jsf2.action.CreateJSF2CompositeContributionItem"
+ id="org.jboss.tools.jsf.web.validation.jsf2.action.JSF2CreateCompositeContributionItem">
+ </dynamic>
+ </menuContribution>
+ <menuContribution
+ locationURI="popup:org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor.source.EditorContext?after=org.jboss.tools.jst.jsp.i18n.ExternalizeStringsContributionItem">
+ <dynamic
+ class="org.jboss.tools.jsf.web.validation.jsf2.action.CreateJSF2CompositeContributionItem"
+ id="org.jboss.tools.jsf.web.validation.jsf2.action.JSF2CreateCompositeContributionItem">
+ </dynamic>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.handlers">
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2011-02-16 10:33:04 UTC (rev 29172)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2011-02-16 11:57:13 UTC (rev 29173)
@@ -150,8 +150,8 @@
public static String Refactoring_JSF_2_Rename_Attr_Ref_Decl;
public static String NonExternalizedStringLiteral;
public static String NonExternalizedStringMarkerLabel;
+ public static String CreateJSF2Composite;
-
static {
// load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, JSFUIMessages.class);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2011-02-16 10:33:04 UTC (rev 29172)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2011-02-16 11:57:13 UTC (rev 29173)
@@ -127,3 +127,4 @@
Refactoring_JSF_2_Rename_Attr_Ref_Decl=Rename composite attribute reference in declaration
NonExternalizedStringLiteral=Non externalized String literal; It should be moved to resource bundles.
NonExternalizedStringMarkerLabel=Move String "{0}" to resource bundle.
+CreateJSF2Composite=Create JSF2 composite...
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAction.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAction.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAction.java 2011-02-16 11:57:13 UTC (rev 29173)
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.common.model.XModelObjectConstants;
+import org.jboss.tools.jsf.JSFModelPlugin;
+import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
+import org.jboss.tools.jst.jsp.editor.IVisualContext;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.jst.jsp.jspeditor.SourceEditorPageContext;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.PaletteTaglibInserter;
+import org.jboss.tools.jst.web.tld.TaglibData;
+import org.jboss.tools.jst.web.tld.URIConstants;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+public class CreateJSF2CompositeAction extends Action {
+
+ private final String IMPLEMENTATION = "composite:implementation"; //$NON-NLS-1$
+
+ private JSPMultiPageEditor editor;
+
+ public CreateJSF2CompositeAction() {
+ super();
+ }
+
+ @Override
+ public void run() {
+ editor = (JSPMultiPageEditor) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ /*
+ * Get the selected text
+ */
+ ISelection selection = editor.getSelectionProvider().getSelection();
+ if (selection instanceof TextSelection) {
+ TextSelection textSelection = (TextSelection) selection;
+ String text = textSelection.getText();
+ /*
+ * Get composite template creator
+ */
+ InputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(),
+ "Creating composite component", //$NON-NLS-1$
+ "Enter component's namespace and name:", "namespace:name", //$NON-NLS-1$ //$NON-NLS-2$
+ null);
+ if (dlg.open() == Window.OK) {
+ /*
+ * Create all required files
+ */
+ String componentName = dlg.getValue();
+ String path = ""; //$NON-NLS-1$
+ String name = ""; //$NON-NLS-1$
+ String namespace = ""; //$NON-NLS-1$
+ int index = componentName.indexOf(":"); //$NON-NLS-1$
+ if (index != -1) {
+ namespace = componentName.substring(0, index);
+ name = componentName.substring(index+1, componentName.length());
+ }
+ path = componentName.replaceAll(":", "/"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!path.endsWith(".xhtml")) { //$NON-NLS-1$
+ path = path + ".xhtml"; //$NON-NLS-1$
+ }
+ IProject project = editor.getProject();
+ if (project != null) {
+ try {
+ IFile createdFile = JSF2ResourceUtil
+ .createCompositeComponentFile(project, new Path(path));
+ /*
+ * Add selected text to the template
+ */
+ IModelManager manager = StructuredModelManager.getModelManager();
+ if (manager != null) {
+ IStructuredModel model = null;
+ try {
+ model = manager.getModelForEdit(createdFile);
+ if (model instanceof IDOMModel) {
+ IDOMModel domModel = (IDOMModel) model;
+ IDOMDocument document = domModel.getDocument();
+ NodeList list = document.getElementsByTagName(IMPLEMENTATION);
+ if (list.getLength() == 1) {
+ String content = document.getStructuredDocument().getText();
+ index = content.indexOf("<"+IMPLEMENTATION+">") + ("<"+IMPLEMENTATION+">").length(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ content = content.subSequence(0, index) + "\n" + text + content.subSequence(index, content.length()); //$NON-NLS-1$
+ domModel.reload(new ByteArrayInputStream(content.getBytes()));
+ model.save();
+ /*
+ * Register JSF 2 composite on the current page
+ */
+ IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+ int offset = textSelection.getOffset();
+ int length = textSelection.getLength();
+ String replacement = "<" + componentName + "> </" + componentName + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ doc.replace(offset, length, replacement);
+ /*
+ * Register the required taglib
+ */
+ StructuredTextEditor ed = ((JSPMultiPageEditor) editor).getSourceEditor();
+ if (ed instanceof JSPTextEditor) {
+ String libraryUri = JSF2ResourceUtil.JSF2_URI_PREFIX + "/" + namespace; //$NON-NLS-1$
+ PaletteTaglibInserter PaletteTaglibInserter = new PaletteTaglibInserter();
+ Properties p = new Properties();
+ p.put("selectionProvider", editor.getSelectionProvider()); //$NON-NLS-1$
+ p.setProperty(URIConstants.LIBRARY_URI, libraryUri);
+ p.setProperty(URIConstants.LIBRARY_VERSION, ""); //$NON-NLS-1$
+ p.setProperty(URIConstants.DEFAULT_PREFIX, namespace);
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, "true"); //$NON-NLS-1$
+ p.setProperty(XModelObjectConstants.REFORMAT, "yes"); //$NON-NLS-1$
+ p.setProperty(XModelObjectConstants.START_TEXT,
+ "<%@ taglib uri=\""+libraryUri+"\" prefix=\"" +namespace+ "\" %>\\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PaletteTaglibInserter.inserTaglib(ed.getTextViewer().getDocument(), p);
+ }
+ /*
+ * Add required taglibs to the composite file
+ */
+ IVisualContext context = editor.getJspEditor().getPageContext();
+ List<TaglibData> taglibs = null;
+ if (context instanceof SourceEditorPageContext) {
+ SourceEditorPageContext sourcePageContext = (SourceEditorPageContext) context;
+ taglibs = sourcePageContext.getTagLibs();
+ }
+ }
+ }
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ } catch (IOException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ } catch (BadLocationException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ } finally {
+ if (model != null) {
+ model.releaseFromEdit();
+ }
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeContributionItem.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeContributionItem.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeContributionItem.java 2011-02-16 11:57:13 UTC (rev 29173)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.swt.widgets.Menu;
+import org.jboss.tools.jsf.messages.JSFUIMessages;
+
+public class CreateJSF2CompositeContributionItem extends ActionContributionItem {
+
+ public CreateJSF2CompositeContributionItem() {
+ super(new CreateJSF2CompositeAction());
+ }
+
+ @Override
+ public void fill(Menu parent, int index) {
+ getAction().setText(JSFUIMessages.CreateJSF2Composite);
+ super.fill(parent, index);
+ }
+}
14 years, 10 months
JBoss Tools SVN: r29172 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-16 05:33:04 -0500 (Wed, 16 Feb 2011)
New Revision: 29172
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java
Log:
JBIDE-8424
https://issues.jboss.org/browse/JBIDE-8424
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java 2011-02-16 10:32:08 UTC (rev 29171)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java 2011-02-16 10:33:04 UTC (rev 29172)
@@ -76,6 +76,7 @@
{ATTRIBUTES[4], ""} //$NON-NLS-1$
}
);
+ appRegister.setDisableContextRoot(true);
XAttributeData[] ad = entityData.getAttributeData();
for (int i = 0; i < ad.length; i++) ad[i].setValue(""); //$NON-NLS-1$
14 years, 10 months
JBoss Tools SVN: r29171 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-16 05:32:08 -0500 (Wed, 16 Feb 2011)
New Revision: 29171
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
Log:
JBIDE-8424
https://issues.jboss.org/browse/JBIDE-8424
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2011-02-16 10:15:43 UTC (rev 29170)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2011-02-16 10:32:08 UTC (rev 29171)
@@ -38,10 +38,14 @@
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.meta.action.SpecialWizard;
import org.jboss.tools.common.meta.action.XEntityData;
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.meta.action.impl.handlers.HUtil;
+import org.jboss.tools.common.meta.constraint.XAttributeEditor;
+import org.jboss.tools.common.meta.constraint.impl.XAttributeEditorImpl;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.util.XModelObjectUtil;
@@ -68,9 +72,15 @@
Composite supportControl;
AddServer addServer = new AddServer();
AddRuntime addRuntime = new AddRuntime();
+
+ boolean disableContextRoot = false;
public void setLight(boolean b) {
}
+
+ public void setDisableContextRoot(boolean disableContextRoot) {
+ this.disableContextRoot = disableContextRoot;
+ }
public void setLayoutForSupport(Layout layout) {
supportLayout = layout;
@@ -100,6 +110,9 @@
attInfo = new String[][] {
{ENTITY, ""}, {ATTR_APP_NAME, "yes"}, {ATTR_RUNTIME, "yes"}, {ATTR_SEPARATOR, "no"}, {ATTR_TARGET_SERVER, "no"} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
};
+
+ initDisablingContextRoot();
+
XEntityData entityData = XEntityDataImpl.create(attInfo);
support = new XAttributeSupport() {
protected boolean keepGreedy(String name, int index, int greedyCount) {
@@ -120,6 +133,17 @@
a = support.getPropertyEditorAdapterByName(ATTR_RUNTIME);
a.addValueChangeListener(new RuntimeInputChangeListener());
}
+
+ void initDisablingContextRoot() {
+ XModelEntity entity = PreferenceModelUtilities.getPreferenceModel().getMetaData().getEntity(ENTITY);
+ XAttribute attr = entity.getAttribute(ATTR_APP_NAME);
+ XAttributeEditorImpl ed = (XAttributeEditorImpl)attr.getEditor();
+ if(disableContextRoot) {
+ ed.setName("Uneditable"); //$NON-NLS-1$
+ } else {
+ ed.setName("Text"); //$NON-NLS-1$
+ }
+ }
public boolean isEnabling() {
return isEnabling;
14 years, 10 months
JBoss Tools SVN: r29170 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-16 05:15:43 -0500 (Wed, 16 Feb 2011)
New Revision: 29170
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
Log:
JBIDE-8424
https://issues.jboss.org/browse/JBIDE-8424
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2011-02-16 10:14:08 UTC (rev 29169)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2011-02-16 10:15:43 UTC (rev 29170)
@@ -59,6 +59,10 @@
setProperty(WebNatureOperation.REGISTER_WEB_CONTEXT_ID, context.getActionProperties().getProperty(NewWebProjectContext.ATTR_REGISTER_WEB_CONTEXT));
setProperty(WebNatureOperation.RUNTIME_NAME, context.getRegisterServerContext().getRuntimeName());
setProperty(WebNatureOperation.JAVA_SOURCES_LOCATION_ID, getJavaSources());
+ String contextRoot = context.getRegisterServerContext().getApplicationName();
+ if(contextRoot != null && contextRoot.length() > 0) {
+ setProperty("WebNatureOperation.CONTEXT_ROOT", contextRoot);
+ }
}
protected abstract IWebProjectTemplate createTemplate();
14 years, 10 months