JBoss Tools SVN: r11046 - branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-21 09:27:25 -0400 (Tue, 21 Oct 2008)
New Revision: 11046
Modified:
branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2894
Modified: branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 13:24:58 UTC (rev 11045)
+++ branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 13:27:25 UTC (rev 11046)
@@ -16,6 +16,7 @@
import java.util.Properties;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -87,10 +88,12 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.editors.dnd.DropCommandFactory;
@@ -111,6 +114,8 @@
import org.jboss.tools.jst.jsp.editor.IJSPTextEditor;
import org.jboss.tools.jst.jsp.editor.IVisualController;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.TLDUtil;
import org.jboss.tools.jst.web.tld.URIConstants;
@@ -281,6 +286,22 @@
return;
}
sourceModel.addModelLifecycleListener(this);
+
+ IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
+ if(editorInput instanceof IFileEditorInput) {
+ XModel xm = null;
+ IProject project = ((IFileEditorInput) editorInput).getFile()
+ .getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if (mn != null) {
+ xm = mn.getModel();
+ }
+ if (xm != null) {
+ WebProject.getInstance(xm).getTaglibMapping().revalidate(
+ WebAppHelper.getWebApp(xm));
+ }
+ }
+
IDOMDocument sourceDocument = sourceModel.getDocument();
visualBuilder.refreshExternalLinks();
visualBuilder.buildDom(sourceDocument);
16 years, 2 months
JBoss Tools SVN: r11045 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-21 09:24:58 -0400 (Tue, 21 Oct 2008)
New Revision: 11045
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2894
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 13:21:56 UTC (rev 11044)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 13:24:58 UTC (rev 11045)
@@ -287,15 +287,20 @@
}
sourceModel.addModelLifecycleListener(this);
- XModel xm = null;
- IProject project = ((IFileEditorInput)pageContext.getEditPart().getEditorInput()).getFile().getProject();
- IModelNature mn = EclipseResourceUtil.getModelNature(project);
- if(mn!=null) {
- xm = mn.getModel();
+ IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
+ if(editorInput instanceof IFileEditorInput) {
+ XModel xm = null;
+ IProject project = ((IFileEditorInput) editorInput).getFile()
+ .getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if (mn != null) {
+ xm = mn.getModel();
+ }
+ if (xm != null) {
+ WebProject.getInstance(xm).getTaglibMapping().revalidate(
+ WebAppHelper.getWebApp(xm));
+ }
}
- if(xm != null) {
- WebProject.getInstance(xm).getTaglibMapping().revalidate(WebAppHelper.getWebApp(xm));
- }
IDOMDocument sourceDocument = sourceModel.getDocument();
visualBuilder.refreshExternalLinks();
16 years, 2 months
JBoss Tools SVN: r11044 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-21 09:21:56 -0400 (Tue, 21 Oct 2008)
New Revision: 11044
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2894
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 12:38:38 UTC (rev 11043)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21 13:21:56 UTC (rev 11044)
@@ -16,6 +16,7 @@
import java.util.Properties;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -87,10 +88,12 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.editors.dnd.DropCommandFactory;
@@ -111,6 +114,8 @@
import org.jboss.tools.jst.jsp.editor.IJSPTextEditor;
import org.jboss.tools.jst.jsp.editor.IVisualController;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.TLDUtil;
import org.jboss.tools.jst.web.tld.URIConstants;
@@ -281,6 +286,17 @@
return;
}
sourceModel.addModelLifecycleListener(this);
+
+ XModel xm = null;
+ IProject project = ((IFileEditorInput)pageContext.getEditPart().getEditorInput()).getFile().getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if(mn!=null) {
+ xm = mn.getModel();
+ }
+ if(xm != null) {
+ WebProject.getInstance(xm).getTaglibMapping().revalidate(WebAppHelper.getWebApp(xm));
+ }
+
IDOMDocument sourceDocument = sourceModel.getDocument();
visualBuilder.refreshExternalLinks();
visualBuilder.buildDom(sourceDocument);
16 years, 2 months
JBoss Tools SVN: r11043 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-21 08:38:38 -0400 (Tue, 21 Oct 2008)
New Revision: 11043
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2931
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java 2008-10-21 12:38:33 UTC (rev 11042)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java 2008-10-21 12:38:38 UTC (rev 11043)
@@ -25,11 +25,11 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.eclipse.core.runtime.IPath;
/**
* @author max
@@ -260,6 +260,15 @@
return (String[]) list.toArray(new String[list.size()]);
}
+ public String getShortDialectName(String fullName) {
+ Iterator keyIterator = dialectNames.keySet().iterator();
+ while (keyIterator.hasNext()){
+ String key = (String)keyIterator.next();
+ if (dialectNames.get(key).equals(fullName)) return key;
+ }
+ return null;
+ }
+
/**
*
* @param dialectName
16 years, 2 months
JBoss Tools SVN: r11042 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-21 08:38:33 -0400 (Tue, 21 Oct 2008)
New Revision: 11042
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2931
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2008-10-21 12:36:36 UTC (rev 11041)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2008-10-21 12:38:33 UTC (rev 11042)
@@ -43,6 +43,8 @@
JpaPageComposite<PersistenceUnit> {
private Text cfgFile;
+
+ DriverClassHelpers helper;
/**
* @param subjectHolder
@@ -54,11 +56,11 @@
super(subjectHolder, container, widgetFactory);
}
- protected void initializeLayout(Composite container) {
+ protected void initializeLayout(Composite container) {
- final DriverClassHelpers helper = new DriverClassHelpers();
-
Composite section = buildSection(container, "Basic properties");
+
+ helper = new DriverClassHelpers();
final SimpleListValueModel<String> lvmDialect = new SimpleListValueModel<String>(Arrays.asList(helper
.getDialectNames()));
@@ -82,8 +84,8 @@
final SimpleListValueModel<String> lvmUrl = new SimpleListValueModel<String>(urls);
WritablePropertyValueModel<String> dialectHolder = buildDialectHolder();
- WritablePropertyValueModel<String> driverHolder = buildDriverHolder();
- WritablePropertyValueModel<String> urlHolder = buildUrlHolder();
+ final WritablePropertyValueModel<String> driverHolder = buildDriverHolder();
+ final WritablePropertyValueModel<String> urlHolder = buildUrlHolder();
Button b = buildButton(section, HibernateConsoleMessages.CodeGenerationSettingsTab_browse, createSetupAction());
cfgFile = buildLabeledText(section,
@@ -115,8 +117,10 @@
public void propertyChanged(PropertyChangeEvent event) {
String dialectClass = helper.getDialectClass((String) event.getNewValue());
String[] driverClasses = helper.getDriverClasses(dialectClass);
+ String driver = driverHolder.getValue();//save value
lvmDriver.clear();
lvmDriver.addAll(Arrays.asList(driverClasses));
+ driverHolder.setValue(driver); //restore value
}
});
@@ -124,8 +128,10 @@
public void propertyChanged(PropertyChangeEvent event) {
String driverClass = helper.getDialectClass((String) event.getNewValue());
String[] connectionURLS = helper.getConnectionURLS(driverClass);
+ String url = urlHolder.getValue();//save value
lvmUrl.clear();
lvmUrl.addAll(Arrays.asList(connectionURLS));
+ urlHolder.setValue(url); //restore value
}
});
@@ -193,13 +199,18 @@
BasicHibernateProperties.DIALECT_PROPERTY) {
@Override
protected String buildValue_() {
- return subject.getDialect();
+ String dialect = subject.getDialect();
+ String value = helper.getShortDialectName(dialect);
+ if (value == null) value = dialect;
+ return value;
}
@Override
protected void setValue_(String value) {
if ("".equals(value))value = null; //$NON-NLS-1$
- subject.setDialect(value);
+ String dialect = helper.getDialectClass(value);
+ if (dialect == null) dialect = value;
+ subject.setDialect(dialect);
}
};
}
16 years, 2 months
JBoss Tools SVN: r11041 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-21 08:36:36 -0400 (Tue, 21 Oct 2008)
New Revision: 11041
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2931
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2008-10-21 12:36:31 UTC (rev 11040)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2008-10-21 12:36:36 UTC (rev 11041)
@@ -43,6 +43,8 @@
JpaPageComposite<PersistenceUnit> {
private Text cfgFile;
+
+ DriverClassHelpers helper;
/**
* @param subjectHolder
@@ -54,11 +56,11 @@
super(subjectHolder, container, widgetFactory);
}
- protected void initializeLayout(Composite container) {
+ protected void initializeLayout(Composite container) {
- final DriverClassHelpers helper = new DriverClassHelpers();
-
Composite section = buildSection(container, "Basic properties");
+
+ helper = new DriverClassHelpers();
final SimpleListValueModel<String> lvmDialect = new SimpleListValueModel<String>(Arrays.asList(helper
.getDialectNames()));
@@ -82,8 +84,8 @@
final SimpleListValueModel<String> lvmUrl = new SimpleListValueModel<String>(urls);
WritablePropertyValueModel<String> dialectHolder = buildDialectHolder();
- WritablePropertyValueModel<String> driverHolder = buildDriverHolder();
- WritablePropertyValueModel<String> urlHolder = buildUrlHolder();
+ final WritablePropertyValueModel<String> driverHolder = buildDriverHolder();
+ final WritablePropertyValueModel<String> urlHolder = buildUrlHolder();
Button b = buildButton(section, HibernateConsoleMessages.CodeGenerationSettingsTab_browse, createSetupAction());
cfgFile = buildLabeledText(section,
@@ -115,8 +117,10 @@
public void propertyChanged(PropertyChangeEvent event) {
String dialectClass = helper.getDialectClass((String) event.getNewValue());
String[] driverClasses = helper.getDriverClasses(dialectClass);
+ String driver = driverHolder.getValue();//save value
lvmDriver.clear();
lvmDriver.addAll(Arrays.asList(driverClasses));
+ driverHolder.setValue(driver); //restore value
}
});
@@ -124,8 +128,10 @@
public void propertyChanged(PropertyChangeEvent event) {
String driverClass = helper.getDialectClass((String) event.getNewValue());
String[] connectionURLS = helper.getConnectionURLS(driverClass);
+ String url = urlHolder.getValue();//save value
lvmUrl.clear();
lvmUrl.addAll(Arrays.asList(connectionURLS));
+ urlHolder.setValue(url); //restore value
}
});
@@ -193,13 +199,18 @@
BasicHibernateProperties.DIALECT_PROPERTY) {
@Override
protected String buildValue_() {
- return subject.getDialect();
+ String dialect = subject.getDialect();
+ String value = helper.getShortDialectName(dialect);
+ if (value == null) value = dialect;
+ return value;
}
@Override
protected void setValue_(String value) {
if ("".equals(value))value = null; //$NON-NLS-1$
- subject.setDialect(value);
+ String dialect = helper.getDialectClass(value);
+ if (dialect == null) dialect = value;
+ subject.setDialect(dialect);
}
};
}
16 years, 2 months
JBoss Tools SVN: r11040 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-21 08:36:31 -0400 (Tue, 21 Oct 2008)
New Revision: 11040
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2931
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java 2008-10-21 12:30:03 UTC (rev 11039)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/DriverClassHelpers.java 2008-10-21 12:36:31 UTC (rev 11040)
@@ -25,11 +25,11 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.eclipse.core.runtime.IPath;
/**
* @author max
@@ -260,6 +260,15 @@
return (String[]) list.toArray(new String[list.size()]);
}
+ public String getShortDialectName(String fullName) {
+ Iterator keyIterator = dialectNames.keySet().iterator();
+ while (keyIterator.hasNext()){
+ String key = (String)keyIterator.next();
+ if (dialectNames.get(key).equals(fullName)) return key;
+ }
+ return null;
+ }
+
/**
*
* @param dialectName
16 years, 2 months
JBoss Tools SVN: r11039 - in branches/jbosstools-3.0.0.Beta1: jst/plugins/org.jboss.tools.jst.jsp/schema and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-21 08:30:03 -0400 (Tue, 21 Oct 2008)
New Revision: 11039
Added:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/schema/
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/schema/visulaEditorImplementations.exsd
Modified:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
=JBIDE-2894,adding extension point for VPE implementation to branch
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2008-10-21 11:16:45 UTC (rev 11038)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2008-10-21 12:30:03 UTC (rev 11039)
@@ -3,7 +3,8 @@
<plugin>
<extension-point id="occurrenceStructureProviders"
- name="%occurrenceStructureProvidersExtensionPoint" />
+ name="%occurrenceStructureProvidersExtensionPoint" />
+ <extension-point id="visulaEditorImplementations" name="Visual Editor Implementations" schema="schema/visulaEditorImplementations.exsd"/>
<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
<sourceViewerConfiguration
@@ -401,4 +402,4 @@
</extension>
-</plugin>
\ No newline at end of file
+</plugin>
Added: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/schema/visulaEditorImplementations.exsd
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/schema/visulaEditorImplementations.exsd (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/schema/visulaEditorImplementations.exsd 2008-10-21 12:30:03 UTC (rev 11039)
@@ -0,0 +1,115 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.jst.jsp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.jst.jsp" id="visulaEditorImplementations" name="Visual Editor Implementations"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="visualEditorImplementation"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="visualEditorImplementation">
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ The name of visual editor implementation
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ Class which implement visual editor factory
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.jboss.tools.jst.jsp.editor.IVisualEditorFactory"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-10-21 11:16:45 UTC (rev 11038)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-10-21 12:30:03 UTC (rev 11039)
@@ -19,6 +19,8 @@
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -80,7 +82,6 @@
import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.jst.web.tld.VpeTaglibManager;
import org.jboss.tools.jst.web.tld.VpeTaglibManagerProvider;
-import org.osgi.framework.Bundle;
// Fix for EXIN-232: The IMultiPageEditor interface implementation is added.
public class JSPMultiPageEditor extends JSPMultiPageEditorPart implements
@@ -101,8 +102,12 @@
private static final String PREVIEW_TAB="Preview"; //$NON-NLS-1$
//visual tab
private static final String VISUAL_SOURCE_TAB="Visual/Source"; //$NON-NLS-1$
+
+ private static final String VPE_VISUAL_EDITOR_IMPL_ID="org.jboss.tools.vpe.org.jboss.tools.vpe.editor.VpeEditorPartFactory"; //$NON-NLS-1$
//source tab
private static final String SOURCE_TAB="Source"; //$NON-NLS-1$
+
+ private static final String VISUAL_EDITOR_IMPL_EXTENSION_POINT_NAME="visulaEditorImplementations"; //$NON-NLS-1$
private IVisualEditor visualEditor;
@@ -137,19 +142,32 @@
static IVisualEditorFactory visualEditorFactory;
static {
+ //Fix For JBIDE-2674
try {
- Bundle b = Platform.getBundle("org.jboss.tools.vpe"); //$NON-NLS-1$
- //FIX for JBIDE-2248
- if(b!=null) {
- Class cls = b
- .loadClass("org.jboss.tools.vpe.editor.VpeEditorPartFactory"); //$NON-NLS-1$
- visualEditorFactory = (IVisualEditorFactory) cls.newInstance();
+ IExtension visualEditorExtension = Platform.getExtensionRegistry()
+ .getExtension(JspEditorPlugin.PLUGIN_ID,
+ VISUAL_EDITOR_IMPL_EXTENSION_POINT_NAME,
+ VPE_VISUAL_EDITOR_IMPL_ID);
+ if (visualEditorExtension != null) {
+ IConfigurationElement[] configurationElements = visualEditorExtension
+ .getConfigurationElements();
+ if (configurationElements != null
+ && configurationElements.length == 1) {
+ visualEditorFactory = (IVisualEditorFactory) configurationElements[0]
+ .createExecutableExtension("class"); //$NON-NLS-1$
+ } else {
+ JspEditorPlugin
+ .getPluginLog()
+ .logError(
+ "Visual Editor Extension Point not configured correctly"); //$NON-NLS-1$
+ }
} else {
- JspEditorPlugin.getPluginLog().logError("Plugin org.jboss.tools.vpe not available," + //$NON-NLS-1$
- " visual page editor will be not available"); //$NON-NLS-1$
+ JspEditorPlugin.getPluginLog().logError(
+ "Visual Editor Implementation not available"); //$NON-NLS-1$
}
- } catch (Exception e) {
- JspEditorPlugin.getPluginLog().logError("Error in loading visual editor factory", e); //$NON-NLS-1$
+ } catch (CoreException e) {
+ JspEditorPlugin.getPluginLog().logError(
+ "Visual Editor Implementation not available" + e); //$NON-NLS-1$
}
}
Modified: branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-10-21 11:16:45 UTC (rev 11038)
+++ branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-10-21 12:30:03 UTC (rev 11039)
@@ -71,4 +71,7 @@
contextId="org.jboss.tools.vpe.editorContext"
sequence="M1+M2+Tab"/>
</extension>
+ <extension point="org.jboss.tools.jst.jsp.visulaEditorImplementations" id="org.jboss.tools.vpe.editor.VpeEditorPartFactory">
+ <visualEditorImplementation name="XulRunner Visual Editor" class="org.jboss.tools.vpe.editor.VpeEditorPartFactory"/>
+ </extension>
</plugin>
16 years, 2 months
JBoss Tools SVN: r11038 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-21 07:16:45 -0400 (Tue, 21 Oct 2008)
New Revision: 11038
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
Log:
corrected commandButton
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-21 11:14:11 UTC (rev 11037)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-21 11:16:45 UTC (rev 11038)
@@ -182,7 +182,7 @@
<vpe:tag name="h:commandButton" case-sensitive="yes">
<vpe:if test="not(attrpresent('image'))">
<vpe:template children="no" modify="no">
- <input type="submit" value="{iif(@value='',' ',jsfvalue(@value))}"
+ <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
class="{@styleClass}" style="{@style}" title="{tagstring()}" />
<vpe:resize>
<vpe:width width-attr="style.width" />
16 years, 2 months
JBoss Tools SVN: r11037 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-21 07:14:11 -0400 (Tue, 21 Oct 2008)
New Revision: 11037
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
Log:
corrected commandButton
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-21 11:04:01 UTC (rev 11036)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-21 11:14:11 UTC (rev 11037)
@@ -181,7 +181,6 @@
<!-- Проблема с адресацией от приложения (30 of 4) -->
<vpe:tag name="h:commandButton" case-sensitive="yes">
<vpe:if test="not(attrpresent('image'))">
- <vpe:if test="@type=''">
<vpe:template children="no" modify="no">
<input type="submit" value="{iif(@value='',' ',jsfvalue(@value))}"
class="{@styleClass}" style="{@style}" title="{tagstring()}" />
@@ -195,23 +194,6 @@
<vpe:textFormatting use-default-formats="yes">
</vpe:textFormatting>
</vpe:template>
- </vpe:if>
- <vpe:if
- test="(@type='button')|(@type='reset')|(@type='submit')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}" title="{tagstring()}" />
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
</vpe:if>
<vpe:if test="attrpresent('image')">
<vpe:template children="no" modify="no">
16 years, 2 months