JBoss Tools SVN: r9900 - in trunk/vpe/plugins/org.jboss.tools.vpe: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-26 10:16:12 -0400 (Tue, 26 Aug 2008)
New Revision: 9900
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesDialogView.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeCssReferencesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
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/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java
Log:
Move configuration for el substitution to the another bundle.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-08-26 14:16:12 UTC (rev 9900)
@@ -62,6 +62,7 @@
org.eclipse.ui.ide,
org.jboss.tools.vpe.xulrunner,
org.mozilla.xpcom,
- org.eclipse.draw2d
+ org.eclipse.draw2d,
+ org.jboss.tools.jst.web
Bundle-Version: 2.1.0
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-08-26 14:16:12 UTC (rev 9900)
@@ -28,8 +28,8 @@
/>
</extension>
<extension point="org.jboss.tools.common.model.classes">
- <xclass id="org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
- class="org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"/>
+ <xclass id="org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
+ class="org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.xstudio.editors" class="org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage" id="org.jboss.tools.vpe.editor" name="Visual Page Editor"></page>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-08-26 14:16:12 UTC (rev 9900)
@@ -35,7 +35,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -45,7 +45,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -85,7 +85,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
@@ -95,7 +95,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
@@ -138,7 +138,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location" Mandatory="no"/>
@@ -149,7 +149,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location"/>
@@ -192,7 +192,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEELReferenceExt">
<AttributeData AttributeName="location"/>
@@ -203,7 +203,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location"/>
@@ -244,7 +244,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location" Mandatory="no"/>
@@ -255,7 +255,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location"/>
@@ -297,7 +297,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEGlobalElReferenceExt">
<AttributeData AttributeName="location"/>
@@ -308,7 +308,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEGlobalElReferenceExt">
<AttributeData AttributeName="location"/>
@@ -411,7 +411,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEImageReference">
<AttributeData AttributeName="location"/>
@@ -421,7 +421,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEImageReference">
<AttributeData AttributeName="location"/>
@@ -460,7 +460,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEImageReferenceExt">
<AttributeData AttributeName="location"/>
@@ -470,7 +470,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEImageReferenceExt">
<AttributeData AttributeName="location"/>
@@ -510,7 +510,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add Taglib Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPETLDReference">
<AttributeData AttributeName="location"/>
@@ -521,7 +521,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Edit Taglib Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPETLDReference">
<AttributeData AttributeName="location"/>
@@ -561,7 +561,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferenceSupport"
displayName="Add TLD Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPETLDReferenceExt">
<AttributeData AttributeName="location"/>
@@ -572,7 +572,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.jst.web.rreferences.VpeAddReferencceSupport"
displayName="Edit TLD Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPETLDReferenceExt">
<AttributeData AttributeName="location"/>
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.vpe.dnd;
+
+import org.eclipse.swt.events.TypedEvent;
+import org.jboss.tools.common.model.ui.editors.dnd.context.DropContext;
+import org.jboss.tools.common.model.ui.editors.dnd.context.IDNDTextEditor;
+import org.jboss.tools.vpe.xulrunner.XPCOM;
+import org.mozilla.interfaces.nsIComponentManager;
+import org.mozilla.interfaces.nsIDOMEvent;
+import org.mozilla.interfaces.nsIDragService;
+import org.mozilla.interfaces.nsIDragSession;
+import org.mozilla.interfaces.nsIServiceManager;
+import org.mozilla.interfaces.nsISupports;
+import org.mozilla.interfaces.nsITransferable;
+import org.mozilla.xpcom.Mozilla;
+
+
+/**
+ * The Class DndUtil.
+ *
+ * @author Eugene Stherbin
+ */
+public class DndUtil {
+
+
+ /** The Constant kTextMime. */
+ public static final String kTextMime = "text/plain"; //$NON-NLS-1$
+
+ /** The Constant kUnicodeMime. */
+ public static final String kUnicodeMime = "text/unicode"; //$NON-NLS-1$
+
+ /** The Constant kHTMLMime. */
+ public static final String kHTMLMime = "text/html"; //$NON-NLS-1$
+
+ /** The Constant kAOLMailMime. */
+ public static final String kAOLMailMime = "AOLMAIL"; //$NON-NLS-1$
+
+ /** The Constant kPNGImageMime. */
+ public static final String kPNGImageMime = "image/png"; //$NON-NLS-1$
+
+ /** The Constant kJPEGImageMime. */
+ public static final String kJPEGImageMime = "image/jpg"; //$NON-NLS-1$
+
+ /** The Constant kGIFImageMime. */
+ public static final String kGIFImageMime = "image/gif"; //$NON-NLS-1$
+
+ /** The Constant kFileMime. */
+ public static final String kFileMime = "application/x-moz-file"; //$NON-NLS-1$
+
+ /** The Constant kURLMime. */
+ public static final String kURLMime = "text/x-moz-url"; //$NON-NLS-1$
+
+ /** The Constant kURLDataMime. */
+ public static final String kURLDataMime = "text/x-moz-url-data"; //$NON-NLS-1$
+
+ /** The Constant kURLDescriptionMime. */
+ public static final String kURLDescriptionMime = "text/x-moz-url-desc"; //$NON-NLS-1$
+
+ /** The Constant kNativeImageMime. */
+ public static final String kNativeImageMime = "application/x-moz-nativeimage"; //$NON-NLS-1$
+
+ /** The Constant kNativeHTMLMime. */
+ public static final String kNativeHTMLMime = "application/x-moz-nativehtml"; //$NON-NLS-1$
+
+ /** The Constant kFilePromiseURLMime. */
+ public static final String kFilePromiseURLMime = "application/x-moz-file-promise-url"; //$NON-NLS-1$
+
+ /** The Constant kFilePromiseMime. */
+ public static final String kFilePromiseMime = "application/x-moz-file-promise"; //$NON-NLS-1$
+
+ /** The Constant kFilePromiseDirectoryMime. */
+ public static final String kFilePromiseDirectoryMime = "application/x-moz-file-promise-dir"; //$NON-NLS-1$
+
+ /** The Constant FLAVORS. */
+ public static final String[] FLAVORS = { kTextMime, kUnicodeMime, kHTMLMime, kAOLMailMime, kPNGImageMime, kJPEGImageMime,
+ kGIFImageMime, kFileMime, kURLMime, kURLDataMime, kURLDescriptionMime, kNativeImageMime, kNativeHTMLMime, kFilePromiseURLMime,
+ kFilePromiseMime, kFilePromiseDirectoryMime };
+
+ /**
+ * The Constructor.
+ */
+ private DndUtil() {
+ super();
+ }
+
+ /**
+ * Fire dn D event.
+ *
+ * @param dropContext the drop context
+ * @param event the event
+ * @param textEditor the text editor
+ */
+ public static void fireDnDEvent(DropContext dropContext, IDNDTextEditor textEditor, TypedEvent event) {
+
+ dropContext.runDropCommand(textEditor, event);
+ }
+
+ /**
+ * Gets the dn D file.
+ *
+ * @param event the event
+ *
+ * @return the dn D file
+ */
+ public static nsISupports getDnDValue(nsIDOMEvent event) {
+ nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager();
+ nsIComponentManager componentManager = Mozilla.getInstance().getComponentManager();
+ nsIDragService dragService = (nsIDragService) serviceManager.getServiceByContractID("@mozilla.org/widget/dragservice;1", //$NON-NLS-1$
+ nsIDragService.NS_IDRAGSERVICE_IID);
+ final nsIDragSession dragSession = dragService.getCurrentSession();
+
+ final nsITransferable iTransferable = (nsITransferable) componentManager.createInstanceByContractID(
+ XPCOM.NS_TRANSFERABLE_CONTRACTID, null, nsITransferable.NS_ITRANSFERABLE_IID);
+
+ for (String flavor1 : FLAVORS) {
+ if (dragSession.isDataFlavorSupported(flavor1)) {
+ iTransferable.addDataFlavor(flavor1);
+ }
+ }
+ String[] aFlavor = { "" }; //$NON-NLS-1$
+ long[] aDataLen = { 0 };
+ nsISupports[] aData = { null };
+
+ dragSession.getData(iTransferable, 0);
+ iTransferable.getAnyTransferData(aFlavor, aData, aDataLen);
+ return aData[0];
+ }
+
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
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-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -14,6 +14,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -46,7 +47,6 @@
import org.eclipse.swt.events.MenuListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
@@ -86,17 +86,10 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
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.editor.el.ELReferenceList;
-import org.jboss.tools.common.editor.rreferences.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.CSSReferenceList;
-import org.jboss.tools.common.editor.rreferences.RelativeFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReferenceListListener;
-import org.jboss.tools.common.editor.rreferences.TaglibReferenceList;
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.ui.dnd.DnDUtil;
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;
@@ -116,11 +109,18 @@
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.el.ELReferenceList;
+import org.jboss.tools.jst.web.rreferences.AbsoluteFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.CSSReferenceList;
+import org.jboss.tools.jst.web.rreferences.RelativeFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.ResourceReferenceListListener;
+import org.jboss.tools.jst.web.rreferences.TaglibReferenceList;
import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.TLDUtil;
import org.jboss.tools.jst.web.tld.URIConstants;
import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.dnd.DndUtil;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
@@ -2818,20 +2818,20 @@
// .getModelBuffer().source();
// if(object == null)
- nsISupports aValue = DnDUtil.getDnDValue(mouseEvent);
+ nsISupports aValue = DndUtil.getDnDValue(mouseEvent);
String aFlavor = "";
if (isNsIFileInstance(aValue)) {
nsIFile aFile = (nsIFile) aValue.queryInterface(nsIFile.NS_IFILE_IID);
if (aValue != null) {
data = aFile.getPath();
- aFlavor = DnDUtil.kFileMime;
+ aFlavor = DndUtil.kFileMime;
}
} else if (isNsIStringInstance(aValue)) {
nsISupportsCString aString = (nsISupportsCString) aValue.queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
data = aString.getData();
- aFlavor = DnDUtil.kHTMLMime;
+ aFlavor = DndUtil.kHTMLMime;
}
// if (object.getFileType() == XModelObject.FILE
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -39,14 +39,14 @@
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.document.NodeImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.jboss.tools.common.editor.rreferences.CSSReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.rreferences.CSSReferenceList;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.dnd.VpeDnD;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -11,11 +11,9 @@
package org.jboss.tools.vpe.editor.context;
import java.util.ArrayList;
-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.resources.IFile;
@@ -27,16 +25,16 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.jboss.tools.common.editor.rreferences.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.CSSReferenceList;
-import org.jboss.tools.common.editor.rreferences.RelativeFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
-import org.jboss.tools.common.editor.rreferences.TaglibReferenceList;
import org.jboss.tools.common.kb.KbConnectorFactory;
import org.jboss.tools.common.kb.KbConnectorType;
import org.jboss.tools.common.kb.wtp.WtpKbConnector;
import org.jboss.tools.jst.jsp.editor.IVisualContext;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.jst.web.rreferences.AbsoluteFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.CSSReferenceList;
+import org.jboss.tools.jst.web.rreferences.RelativeFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
+import org.jboss.tools.jst.web.rreferences.TaglibReferenceList;
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.jst.web.tld.VpeTaglibListener;
import org.jboss.tools.vpe.VpePlugin;
@@ -45,7 +43,6 @@
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.util.FileUtil;
import org.jboss.tools.vpe.editor.util.XmlUtil;
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesDialogView.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesDialogView.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesDialogView.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.editor.css;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
-import org.jboss.tools.common.editor.rreferences.ResourceReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReferencesTableProvider;
-import org.jboss.tools.common.editor.rreferences.VpeAddReferenceSupport;
-import org.jboss.tools.common.model.ui.action.CommandBar;
-import org.jboss.tools.common.model.ui.action.CommandBarListener;
-import org.jboss.tools.common.model.ui.objecteditor.XTable;
-import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public abstract class ResourceReferencesDialogView extends AbstractQueryWizardView {
- static String ADD = "Add";
- static String EDIT = "Edit";
- static String REMOVE = "Remove";
- protected XTable table = new XTable();
- protected CommandBar bar = new CommandBar();
- protected ResourceReferencesTableProvider tableProvider;// = new TemplatesTableProvider();
- IFile file;
- IPath path;
- protected List dataList = new ArrayList();
-
- public ResourceReferencesDialogView() {
- init();
- }
-
- private void init() {
-// changed = false;
- tableProvider = createTableProvider(dataList);
-///ResourceReferencesTableProvider.getCSSTableProvider(dataList);
- bar.getLayout().buttonWidth = 80;
- bar.getLayout().direction = SWT.VERTICAL;
- bar.setCommands(new String[]{ADD, EDIT, REMOVE});
- bar.addCommandBarListener(new BarListener());
- table.setTableProvider(tableProvider);
- }
-
- protected abstract ResourceReferencesTableProvider createTableProvider(List dataList);
- protected abstract ResourceReferenceList getReferenceList();
-
- public void setObject(Object object) {
- super.setObject(object);
- Properties p = findProperties(object);
- file = (IFile)p.get("file");
- path = (IPath)p.get("path");
- ResourceReference[] rs = (file != null) ? getReferenceList().getAllResources(file) :
- (path != null) ? getReferenceList().getAllResources(path)
- : new ResourceReference[0];
- for (int i = 0; i < rs.length; i++) dataList.add(rs[i]);
- }
-
- public Control createControl(Composite parent) {
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout g = new GridLayout(2, false);
- c.setLayout(g);
- Control slc = table.createControl(c);
- slc.setLayoutData(new GridData(GridData.FILL_BOTH));
- Control bc = bar.createControl(c);
- GridData gd = new GridData(GridData.FILL_VERTICAL);
- bc.setLayoutData(gd);
- table.getTable().addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateBars();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
- update();
- return c;
- }
-
- ResourceReference[] getReferenceArray() {
- return (ResourceReference[])dataList.toArray(new ResourceReference[0]);
- }
-
- public void action(String command) {
- stopEditing();
- if(OK.equalsIgnoreCase(command)) {
- if(file != null) {
- getReferenceList().setAllResources(file, getReferenceArray());
- } else {
- getReferenceList().setAllResources(path, getReferenceArray());
- }
- }
- super.action(command);
- }
- class BarListener implements CommandBarListener {
- public void action(String command) {
- int index = table.getSelectionIndex();
- if(ADD.equals(command)) {
- add(index);
- } else if(EDIT.equals(command)) {
- edit(index);
- } else if(REMOVE.equals(command)) {
- remove(index);
- }
- update();
- }
- }
-
- protected void add(int index) {
- ResourceReference css = new ResourceReference("", ResourceReference.FOLDER_SCOPE);
- boolean ok = VpeAddReferenceSupport.add(file, css, getReferenceArray(), getEntity());
- if(!ok) return;
- dataList.add(css);
- update();
- table.setSelection(dataList.size() - 1);
- }
-
- protected void edit(int index) {
- if(index < 0) return;
- ResourceReference css = getReferenceArray()[index];
- boolean ok = VpeAddReferenceSupport.edit(file, css, getReferenceArray(), getEntity());
- if(!ok) return;
- update();
- }
-
- protected abstract String getEntity();
-
- void remove(int index) {
- if(index >= 0) dataList.remove(index);
- }
-
- public void update() {
- if(table != null) table.update();
- updateBars();
- }
-
- void updateBars() {
- bar.setEnabled(EDIT, canModify());
- bar.setEnabled(REMOVE, canModify());
- }
-
- private boolean canModify() {
- return table.getSelectionIndex() >= 0;
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeCssReferencesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeCssReferencesDialog.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeCssReferencesDialog.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.editor.css;
-
-import java.util.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.editor.rreferences.CSSReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReferencesTableProvider;
-import org.jboss.tools.common.model.ui.wizards.query.*;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-
-public class VpeCssReferencesDialog extends AbstractQueryWizard {
-
- public static boolean run(IFile file) {
- VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
- Properties p = new Properties();
- p.setProperty("help", "VpeCssReferencesDialog");
- p.put("file", file);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
- dialog.setObject(p);
- int code = dialog.execute();
- return code == 0;
- }
-
- public static boolean run(IPath path) {
- VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
- Properties p = new Properties();
- p.setProperty("help", "VpeCssReferencesDialog");
- p.put("path", path);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
- dialog.setObject(p);
- int code = dialog.execute();
- return code == 0;
- }
-
- public VpeCssReferencesDialog() {
- setView(new VpeCssReferencesDialogView());
- }
-
-}
-
-class VpeCssReferencesDialogView extends ResourceReferencesDialogView {
-
- public VpeCssReferencesDialogView() {}
-
- protected String getEntity() {
- return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
- }
-
- protected ResourceReferencesTableProvider createTableProvider(List dataList) {
- return ResourceReferencesTableProvider.getCSSTableProvider(dataList);
- }
-
- protected ResourceReferenceList getReferenceList() {
- return CSSReferenceList.getInstance();
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialog.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialog.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.editor.css;
-
-import java.util.Properties;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizard;
-
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-
-public class VpeResourcesDialog extends AbstractQueryWizard {
-
- public static boolean run(IFile file) {
- VpeResourcesDialog dialog = new VpeResourcesDialog();
- Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("file", file);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
- dialog.setObject(p);
- int code = dialog.execute();
- return code == 0;
- }
-
- public static boolean run(IPath path) {
- VpeResourcesDialog dialog = new VpeResourcesDialog();
- Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("path", path);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
- dialog.setObject(p);
- int code = dialog.execute();
- return code == 0;
- }
-
- public VpeResourcesDialog() {
- setView(new VpeResourcesDialogView());
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.editor.css;
-
-import java.util.Properties;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.common.editor.el.ElVariablesComposite;
-import org.jboss.tools.common.editor.rreferences.AbsoluteFolderReferenceComposite;
-import org.jboss.tools.common.editor.rreferences.CssReferencesComposite;
-import org.jboss.tools.common.editor.rreferences.RelativeFolderReferenceComposite;
-import org.jboss.tools.common.editor.rreferences.TaglibReferencesComposite;
-import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
-
-public class VpeResourcesDialogView extends AbstractQueryWizardView {
- IFile file;
- IPath path;
- CssReferencesComposite css = new CssReferencesComposite();
- //changed by estherbin
- //http://jira.jboss.com/jira/browse/JBIDE-2010
- ElVariablesComposite el = new ElVariablesComposite();
- TaglibReferencesComposite tld = new TaglibReferencesComposite();
- AbsoluteFolderReferenceComposite absFolder = new AbsoluteFolderReferenceComposite();
- RelativeFolderReferenceComposite relFolder = new RelativeFolderReferenceComposite();
-
- public void setObject(Object object) {
- super.setObject(object);
- Properties p = findProperties(object);
- file = (IFile)p.get("file");
- path = (IPath)p.get("path");
-
- css.setObject(object);
- //changed by estherbin
- //http://jira.jboss.com/jira/browse/JBIDE-2010
- el.setObject(object);
- tld.setObject(object);
- absFolder.setObject(p);
- relFolder.setObject(p);
- }
-
- public Control createControl(Composite parent) {
- GridData data;
- Composite c = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- c.setLayout(layout);
-
- Control absControl = absFolder.createControl(c);
- data = new GridData(GridData.FILL_HORIZONTAL);
- absControl.setLayoutData(data);
-
- Control relControl = relFolder.createControl(c);
- data = new GridData(GridData.FILL_HORIZONTAL);
- relControl.setLayoutData(data);
-
- Control cssControl = css.createControl(c);
- data = new GridData(GridData.FILL_BOTH);
- cssControl.setLayoutData(data);
- Control tldControl = tld.createControl(c);
- data = new GridData(GridData.FILL_BOTH);
- tldControl.setLayoutData(data);
-
- //changed by estherbin
- //http://jira.jboss.com/jira/browse/JBIDE-2010
- Control elControl = el.createControl(c);
- data = new GridData(GridData.FILL_BOTH);
- elControl.setLayoutData(data);
- return c;
- }
-
- public void action(String command) {
- if(OK.equals(command)) {
- absFolder.commit();
- relFolder.commit();
- el.commit();
- css.commit();
- tld.commit();
- }
- super.action(command);
- }
-
- public Point getPreferredSize() {
- //changed by estherbin
- //http://jira.jboss.com/jira/browse/JBIDE-2010
- String os_name = System.getProperty("os.name");
- if(os_name != null && os_name.indexOf("Windows") >= 0) return new Point(800, 600);
- //changed by estherbin
- //http://jira.jboss.com/jira/browse/JBIDE-2010
- return new Point(600, 700);
- }
-
-}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -48,9 +48,9 @@
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.editors.text.ILocationProvider;
import org.eclipse.ui.part.EditorPart;
+import org.jboss.tools.jst.web.rreferences.VpeResourcesDialog;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
-import org.jboss.tools.vpe.editor.css.VpeResourcesDialog;
import org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage;
import org.jboss.tools.vpe.editor.toolbar.IVpeToolBarManager;
import org.jboss.tools.vpe.editor.toolbar.VpeToolBarManager;
@@ -74,8 +74,6 @@
import org.mozilla.interfaces.nsIHTMLInlineTableEditor;
import org.mozilla.interfaces.nsIHTMLObjectResizer;
import org.mozilla.interfaces.nsIPlaintextEditor;
-import org.mozilla.interfaces.nsISelection;
-import org.mozilla.interfaces.nsISelectionPrivate;
public class MozillaEditor extends EditorPart implements IReusableEditor {
protected static final String INIT_URL = /*"file://" +*/ (new File(VpePlugin.getDefault().getResourcePath("ve"), "init.html")).getAbsolutePath(); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -26,7 +26,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.common.xml.XMLUtilities;
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.VpePlugin;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -22,7 +22,6 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.common.kb.AttributeDescriptor;
import org.jboss.tools.common.kb.AttributeValueDescriptor;
import org.jboss.tools.common.kb.KbException;
@@ -32,6 +31,7 @@
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
import org.jboss.tools.jst.web.tld.IFilePathEncoder;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,386 +1,386 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.vpe.editor.util;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.editor.el.ELReferenceList;
-import org.jboss.tools.common.editor.el.GlobalELReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
-import org.jboss.tools.vpe.editor.bundle.BundleMap;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-
-/**
- * The {@link IELService} implementation.
- *
- * @author Eugeny Stherbin
- */
-public final class ElService implements IELService {
-
- /** The Constant INSTANCE. */
- private static final IELService INSTANCE = new ElService();
-
- /**
- * Checks if is available.
- *
- * @param resourceFile the resource file
- *
- * @return true, if is available
- */
- public boolean isAvailable(IFile resourceFile) {
- boolean rst = false;
- final ResourceReference[] references = getAllResources(resourceFile);
-
- if ((references != null) && (references.length > 0)) {
- rst = true;
- }
- return rst;
- }
-
-
- /**
- * Gets the singleton instance.
- *
- * @return the singleton instance
- */
- public static synchronized IELService getInstance() {
- return INSTANCE;
- }
-
- /**
- * The Constructor.
- */
- private ElService() {
- super();
- }
-
-
- /**
- * Replace el.
- *
- * @param resourceFile the resource file
- * @param resourceString the resource string
- *
- * @return the string
- *
- * @see IELService#getReplacedElValue(IFile, String)
- */
- //@Deprecated
- public String replaceEl(IFile resourceFile, String resourceString) {
- // Assert.isNotNull(resourceString);
- if ((resourceString == null) || (resourceFile == null)) {
- return ""; //$NON-NLS-1$
- }
- Assert.isNotNull(resourceFile);
- String rst = resourceString;
- final ResourceReference[] references = getAllResources(resourceFile);
-
-
- if ((references != null) && (references.length > 0)) {
- rst = replace(resourceString, references);
- }
- return rst;
- }
-
-
-
- /**
- * Replace.
- *
- * @param resourceString the resource string
- * @param references the references
- *
- * @return the string
- */
- private String replace(String resourceString, ResourceReference[] references) {
- String result = resourceString;
-
- for (ResourceReference rf : references) {
- if (resourceString.contains(rf.getLocation())) {
- result = result.replace(rf.getLocation(),rf.getProperties());
- }
- }
- return result;
- }
-
-
- /**
- * Checks if is cloneable node.
- *
- * @param sourceNode the source node
- * @param pageContext the page context
- *
- * @return true, if is cloneable node
- */
- public boolean isCloneableNode(VpePageContext pageContext,Node sourceNode) {
- boolean rst = false;
- final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
-
- if (((this.isAvailable(file) && this.isAvailableForNode(sourceNode, file))) || isInResourcesBundle(pageContext, sourceNode)){
- rst = true;
- }
- return rst;
- }
-
- /**
- *
- * @param pageContext
- * @param sourceNode
- * @return
- */
- public boolean isInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
- boolean rst = findInResourcesBundle(pageContext, sourceNode);
-
-// if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
-// for (int i = 0; i < sourceNode.getChildNodes().getLength(); i++) {
-// final Node node = sourceNode.getChildNodes().item(i);
-//
-// if (node.getNodeType() == Node.ELEMENT_NODE) {
-// if((rst = findInResourcesBundle(pageContext, node))){
-// break;
-// }
-//
-//
-// }
-//
-// }
-// }
-
- return rst;
- }
-
-
- /**
- * @param pageContext
- * @param sourceNode
- * @return
- */
- private boolean findInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
- boolean rst = false;
-
- BundleMap bundleMap = pageContext.getBundle();
- if (bundleMap != null) {
- String textValue = null;
-
- if (sourceNode.getNodeType() == Node.TEXT_NODE) {
- textValue = sourceNode.getNodeValue();
-
- if ((textValue != null) && TextUtil.isContainsEl(textValue)) {
- final String newValue = bundleMap.getBundleValue(textValue, 0);
-
- if (!textValue.equals(newValue)) {
- rst = true;
- }
- }
- }
-// }else if ((sourceNode.getFirstChild() != null) && (sourceNode.getFirstChild().getNodeType() == Node.TEXT_NODE)) {
-// textValue = sourceNode.getFirstChild().getNodeValue();
-// }
-
- if (!rst) {
- final NamedNodeMap nodeMap = sourceNode.getAttributes();
-
- if (nodeMap != null && nodeMap.getLength() > 0) {
- for (int i = 0; i < nodeMap.getLength(); i++) {
- final Attr attr = (Attr) nodeMap.item(i);
- final String value = attr.getValue();
-
- if (value != null && TextUtil.isContainsEl(value)) {
- final String value2 = bundleMap.getBundleValue(value, 0);
-
- if (!value2.equals(value)) {
- rst = true;
- break;
- }
- }
- }
- }
- }
- }
- return rst;
- }
-
-
-
- /**
- * Checks if is available for node.
- *
- * @param resourceFile the resource file
- * @param sourceNode the source node
- *
- * @return true, if is available for node
- */
- private boolean isAvailableForNode(Node sourceNode, IFile resourceFile) {
- boolean rst = findForNode(sourceNode, resourceFile);
-
-// if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
-// for (int i = 0; i < sourceNode.getChildNodes().getLength(); i++) {
-// final Node node = sourceNode.getChildNodes().item(i);
-//
-// if (node.getNodeType() == Node.ELEMENT_NODE) {
-// if((rst = findForNode((Element) node, resourceFile))){
-// break;
-// }
-// }
-//
-// }
-// }
-
- return rst;
- }
-
-
- /**
- * @param sourceNode
- * @param resourceFile
- * @return
- */
- private boolean findForNode(Node sourceNode, IFile resourceFile) {
- boolean rst = false;
- final NamedNodeMap nodeMap = sourceNode.getAttributes();
- final ResourceReference[] references = getAllResources(resourceFile);
- //ELReferenceList.getInstance().getAllResources(resourceFile);
- String textValue = null;
-
- if (sourceNode.getNodeType() == Node.TEXT_NODE/*
- * sourceNode.getFirstChild
- * () != null &&
- * sourceNode
- * .getFirstChild
- * ().getNodeType() ==
- * Node.TEXT_NODE
- */) {
- textValue = sourceNode.getNodeValue();
- if (textValue != null) {
- if (isInReferenceResourcesList(references, textValue)) {
- return true;
- }
- }
- }
-
- if ((nodeMap != null) && (nodeMap.getLength() > 0)) {
- for (int i = 0; i < nodeMap.getLength(); i++) {
- if (isInReferenceResourcesList(references, ((Attr) nodeMap.item(i)).getValue())) {
- rst = true;
- break;
- }
- }
- }
- return rst;
- }
-
-
- /**
- * Checks if is in reference resources list.
- *
- * @param value the value
- * @param references the references
- *
- * @return true, if is in reference resources list
- */
- private boolean isInReferenceResourcesList(ResourceReference[] references, String value) {
- boolean rst = false;
-
- for (ResourceReference ref : references) {
- if (value.contains(ref.getLocation())) {
- rst = true;
- }
- }
- return rst;
- }
-
-
- /**
- * Reverse replace.
- *
- * @param resourceFile the resource file
- * @param replacedString the replaced string
- *
- * @return the string
- */
- public String reverseReplace(IFile resourceFile, String replacedString) {
- String str = replacedString;
- final ResourceReference[] references = getAllResources(resourceFile);
- //ELReferenceList.getInstance().getAllResources(resourceFile);
-
- if ((str != null) && (references != null) && (references.length > 0)) {
- for (ResourceReference rf : references) {
- if (replacedString.contains(rf.getProperties())) {
- str = str.replace(rf.getProperties(), rf.getLocation());
- }
- }
- }
-
- return str;
- }
-
-
-
- protected ResourceReference[] getAllResources(IFile resourceFile) {
- ResourceReference[] rst = null;
- final IPath workspacePath = Platform.getLocation();
-
- final ResourceReference[] gResources = GlobalELReferenceList.getInstance().getAllResources(workspacePath);
- final ResourceReference[] elResources = ELReferenceList.getInstance().getAllResources(resourceFile);
-
- int size = (gResources == null ? 0 : gResources.length);
- size += (elResources == null ? 0 : elResources.length);
- rst = new ResourceReference[size];
- int counter = 0;
- if ((gResources != null) && (gResources.length > 0)) {
- for (ResourceReference r : gResources) {
- rst[counter] = r;
- counter++;
- }
- }
- if ((elResources != null) && (elResources.length > 0)) {
- for (ResourceReference r : elResources) {
- rst[counter] = r;
- counter++;
- }
- }
-
- return rst;
-
- }
-
- public String replaceElAndResources(VpePageContext pageContext, Node attributeNode) {
- final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
-
- String attribuString = null;
- if (attributeNode instanceof Attr) {
- attribuString = ((Attr) attributeNode).getValue();
- } else {
- attribuString = attributeNode.getNodeValue();
- }
- String rst = attribuString;
-
- rst = ResourceUtil.getBundleValue(pageContext, attributeNode);
- rst = replaceEl(file, rst);
-
- return rst;
- }
-
-// private String replaceResourceBundle(VpePageContext context,Attr attributeNode){
-//
-// }
-
-
-
-}
+/*******************************************************************************
+ * Copyright (c) 2007 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.vpe.editor.util;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.jst.web.el.ELReferenceList;
+import org.jboss.tools.jst.web.el.GlobalELReferenceList;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
+import org.jboss.tools.vpe.editor.bundle.BundleMap;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+
+/**
+ * The {@link IELService} implementation.
+ *
+ * @author Eugeny Stherbin
+ */
+public final class ElService implements IELService {
+
+ /** The Constant INSTANCE. */
+ private static final IELService INSTANCE = new ElService();
+
+ /**
+ * Checks if is available.
+ *
+ * @param resourceFile the resource file
+ *
+ * @return true, if is available
+ */
+ public boolean isAvailable(IFile resourceFile) {
+ boolean rst = false;
+ final ResourceReference[] references = getAllResources(resourceFile);
+
+ if ((references != null) && (references.length > 0)) {
+ rst = true;
+ }
+ return rst;
+ }
+
+
+ /**
+ * Gets the singleton instance.
+ *
+ * @return the singleton instance
+ */
+ public static synchronized IELService getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * The Constructor.
+ */
+ private ElService() {
+ super();
+ }
+
+
+ /**
+ * Replace el.
+ *
+ * @param resourceFile the resource file
+ * @param resourceString the resource string
+ *
+ * @return the string
+ *
+ * @see IELService#getReplacedElValue(IFile, String)
+ */
+ //@Deprecated
+ public String replaceEl(IFile resourceFile, String resourceString) {
+ // Assert.isNotNull(resourceString);
+ if ((resourceString == null) || (resourceFile == null)) {
+ return ""; //$NON-NLS-1$
+ }
+ Assert.isNotNull(resourceFile);
+ String rst = resourceString;
+ final ResourceReference[] references = getAllResources(resourceFile);
+
+
+ if ((references != null) && (references.length > 0)) {
+ rst = replace(resourceString, references);
+ }
+ return rst;
+ }
+
+
+
+ /**
+ * Replace.
+ *
+ * @param resourceString the resource string
+ * @param references the references
+ *
+ * @return the string
+ */
+ private String replace(String resourceString, ResourceReference[] references) {
+ String result = resourceString;
+
+ for (ResourceReference rf : references) {
+ if (resourceString.contains(rf.getLocation())) {
+ result = result.replace(rf.getLocation(),rf.getProperties());
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ * Checks if is cloneable node.
+ *
+ * @param sourceNode the source node
+ * @param pageContext the page context
+ *
+ * @return true, if is cloneable node
+ */
+ public boolean isCloneableNode(VpePageContext pageContext,Node sourceNode) {
+ boolean rst = false;
+ final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
+
+ if (((this.isAvailable(file) && this.isAvailableForNode(sourceNode, file))) || isInResourcesBundle(pageContext, sourceNode)){
+ rst = true;
+ }
+ return rst;
+ }
+
+ /**
+ *
+ * @param pageContext
+ * @param sourceNode
+ * @return
+ */
+ public boolean isInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
+ boolean rst = findInResourcesBundle(pageContext, sourceNode);
+
+// if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
+// for (int i = 0; i < sourceNode.getChildNodes().getLength(); i++) {
+// final Node node = sourceNode.getChildNodes().item(i);
+//
+// if (node.getNodeType() == Node.ELEMENT_NODE) {
+// if((rst = findInResourcesBundle(pageContext, node))){
+// break;
+// }
+//
+//
+// }
+//
+// }
+// }
+
+ return rst;
+ }
+
+
+ /**
+ * @param pageContext
+ * @param sourceNode
+ * @return
+ */
+ private boolean findInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
+ boolean rst = false;
+
+ BundleMap bundleMap = pageContext.getBundle();
+ if (bundleMap != null) {
+ String textValue = null;
+
+ if (sourceNode.getNodeType() == Node.TEXT_NODE) {
+ textValue = sourceNode.getNodeValue();
+
+ if ((textValue != null) && TextUtil.isContainsEl(textValue)) {
+ final String newValue = bundleMap.getBundleValue(textValue, 0);
+
+ if (!textValue.equals(newValue)) {
+ rst = true;
+ }
+ }
+ }
+// }else if ((sourceNode.getFirstChild() != null) && (sourceNode.getFirstChild().getNodeType() == Node.TEXT_NODE)) {
+// textValue = sourceNode.getFirstChild().getNodeValue();
+// }
+
+ if (!rst) {
+ final NamedNodeMap nodeMap = sourceNode.getAttributes();
+
+ if (nodeMap != null && nodeMap.getLength() > 0) {
+ for (int i = 0; i < nodeMap.getLength(); i++) {
+ final Attr attr = (Attr) nodeMap.item(i);
+ final String value = attr.getValue();
+
+ if (value != null && TextUtil.isContainsEl(value)) {
+ final String value2 = bundleMap.getBundleValue(value, 0);
+
+ if (!value2.equals(value)) {
+ rst = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ return rst;
+ }
+
+
+
+ /**
+ * Checks if is available for node.
+ *
+ * @param resourceFile the resource file
+ * @param sourceNode the source node
+ *
+ * @return true, if is available for node
+ */
+ private boolean isAvailableForNode(Node sourceNode, IFile resourceFile) {
+ boolean rst = findForNode(sourceNode, resourceFile);
+
+// if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
+// for (int i = 0; i < sourceNode.getChildNodes().getLength(); i++) {
+// final Node node = sourceNode.getChildNodes().item(i);
+//
+// if (node.getNodeType() == Node.ELEMENT_NODE) {
+// if((rst = findForNode((Element) node, resourceFile))){
+// break;
+// }
+// }
+//
+// }
+// }
+
+ return rst;
+ }
+
+
+ /**
+ * @param sourceNode
+ * @param resourceFile
+ * @return
+ */
+ private boolean findForNode(Node sourceNode, IFile resourceFile) {
+ boolean rst = false;
+ final NamedNodeMap nodeMap = sourceNode.getAttributes();
+ final ResourceReference[] references = getAllResources(resourceFile);
+ //ELReferenceList.getInstance().getAllResources(resourceFile);
+ String textValue = null;
+
+ if (sourceNode.getNodeType() == Node.TEXT_NODE/*
+ * sourceNode.getFirstChild
+ * () != null &&
+ * sourceNode
+ * .getFirstChild
+ * ().getNodeType() ==
+ * Node.TEXT_NODE
+ */) {
+ textValue = sourceNode.getNodeValue();
+ if (textValue != null) {
+ if (isInReferenceResourcesList(references, textValue)) {
+ return true;
+ }
+ }
+ }
+
+ if ((nodeMap != null) && (nodeMap.getLength() > 0)) {
+ for (int i = 0; i < nodeMap.getLength(); i++) {
+ if (isInReferenceResourcesList(references, ((Attr) nodeMap.item(i)).getValue())) {
+ rst = true;
+ break;
+ }
+ }
+ }
+ return rst;
+ }
+
+
+ /**
+ * Checks if is in reference resources list.
+ *
+ * @param value the value
+ * @param references the references
+ *
+ * @return true, if is in reference resources list
+ */
+ private boolean isInReferenceResourcesList(ResourceReference[] references, String value) {
+ boolean rst = false;
+
+ for (ResourceReference ref : references) {
+ if (value.contains(ref.getLocation())) {
+ rst = true;
+ }
+ }
+ return rst;
+ }
+
+
+ /**
+ * Reverse replace.
+ *
+ * @param resourceFile the resource file
+ * @param replacedString the replaced string
+ *
+ * @return the string
+ */
+ public String reverseReplace(IFile resourceFile, String replacedString) {
+ String str = replacedString;
+ final ResourceReference[] references = getAllResources(resourceFile);
+ //ELReferenceList.getInstance().getAllResources(resourceFile);
+
+ if ((str != null) && (references != null) && (references.length > 0)) {
+ for (ResourceReference rf : references) {
+ if (replacedString.contains(rf.getProperties())) {
+ str = str.replace(rf.getProperties(), rf.getLocation());
+ }
+ }
+ }
+
+ return str;
+ }
+
+
+
+ protected ResourceReference[] getAllResources(IFile resourceFile) {
+ ResourceReference[] rst = null;
+ final IPath workspacePath = Platform.getLocation();
+
+ final ResourceReference[] gResources = GlobalELReferenceList.getInstance().getAllResources(workspacePath);
+ final ResourceReference[] elResources = ELReferenceList.getInstance().getAllResources(resourceFile);
+
+ int size = (gResources == null ? 0 : gResources.length);
+ size += (elResources == null ? 0 : elResources.length);
+ rst = new ResourceReference[size];
+ int counter = 0;
+ if ((gResources != null) && (gResources.length > 0)) {
+ for (ResourceReference r : gResources) {
+ rst[counter] = r;
+ counter++;
+ }
+ }
+ if ((elResources != null) && (elResources.length > 0)) {
+ for (ResourceReference r : elResources) {
+ rst[counter] = r;
+ counter++;
+ }
+ }
+
+ return rst;
+
+ }
+
+ public String replaceElAndResources(VpePageContext pageContext, Node attributeNode) {
+ final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
+
+ String attribuString = null;
+ if (attributeNode instanceof Attr) {
+ attribuString = ((Attr) attributeNode).getValue();
+ } else {
+ attribuString = attributeNode.getNodeValue();
+ }
+ String rst = attribuString;
+
+ rst = ResourceUtil.getBundleValue(pageContext, attributeNode);
+ rst = replaceEl(file, rst);
+
+ return rst;
+ }
+
+// private String replaceResourceBundle(VpePageContext context,Attr attributeNode){
+//
+// }
+
+
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+// * Copyright (c) 2007 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,
@@ -28,14 +28,13 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.jboss.tools.common.editor.rreferences.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.RelativeFolderReferenceList;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.vpe.VpeDebug;
+import org.jboss.tools.jst.web.rreferences.AbsoluteFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.RelativeFolderReferenceList;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
import org.jboss.tools.vpe.VpePlugin;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -22,16 +22,15 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.jst.web.rreferences.ResourceReference;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
-import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.w3c.dom.Element;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java 2008-08-26 14:05:50 UTC (rev 9899)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java 2008-08-26 14:16:12 UTC (rev 9900)
@@ -23,7 +23,6 @@
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.jboss.tools.common.editor.rreferences.ResourceReference;
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
16 years, 6 months
JBoss Tools SVN: r9899 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-08-26 10:05:50 -0400 (Tue, 26 Aug 2008)
New Revision: 9899
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-08-26 13:11:58 UTC (rev 9898)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-08-26 14:05:50 UTC (rev 9899)
@@ -553,5 +553,40 @@
class="org.jboss.tools.seam.ui.search.SeamQueryParticipant"
id="org.jboss.tools.seam.ui.search.SeamQueryParticipant" />
</extension>
-
-</plugin>
+
+<!-- Refactorng -->
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#CompilationUnitEditorContext?after=org.eclipse.jdt.ui.refactoring.menu">
+ <menu
+ id="java.editor.seam.popup.menu"
+ label="Seam">
+ <command
+ commandId="org.jboss.tools.seam.ui.refactoring.component"
+ id="org.jboss.tools.seam.ui.open.component.submenu"
+ label="Refactor Seam Component"
+ style="push"
+ tooltip="Refactor Seam Component">
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.jboss.tools.seam.ui.refactoring.component"
+ description="Seam Refactoring"
+ name="Seam Refactoring">
+ </command>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.jboss.tools.seam.ui.refactoring.component"
+ class="org.jboss.tools.seam.ui.refactoring.SeamComponentRefactoringHandler"/>
+ </extension>
+
+</plugin>
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRefactoringHandler.java 2008-08-26 14:05:50 UTC (rev 9899)
@@ -0,0 +1,42 @@
+ /*******************************************************************************
+ * Copyright (c) 2008 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.seam.ui.refactoring;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * @author Alexey Kazakov
+ *
+ */
+public class SeamComponentRefactoringHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchPart part = HandlerUtil.getActivePart(event);
+ IEditorPart editor = HandlerUtil.getActiveEditor(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+
+// Object context = event.getApplicationContext();
+// if (context instanceof IEvaluationContext) {
+// IEvaluationContext appContext = (IEvaluationContext) context;
+//
+// }
+ return null;
+ }
+}
\ No newline at end of file
16 years, 6 months
JBoss Tools SVN: r9898 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: console/model/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-08-26 09:11:58 -0400 (Tue, 26 Aug 2008)
New Revision: 9898
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterDefinition.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1913
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-26 11:18:46 UTC (rev 9897)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-26 13:11:58 UTC (rev 9898)
@@ -493,6 +493,8 @@
public static String ExporterSettingsTab_select_exporter_you_want_to_add;
public static String ExporterSettingsTab_template_directory_for;
public static String ExporterSettingsTab_use_java5_syntax;
+ public static String ExporterSettingsTab_select_dir;
+ public static String ExporterSettingsTab_select_path;
public static String GeneralExceptionStatusHandler_exception_while_generating_code;
public static String GeneralExceptionStatusHandler_generating_code;
public static String PathHelper_does_not_exist;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-26 11:18:46 UTC (rev 9897)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-26 13:11:58 UTC (rev 9898)
@@ -484,6 +484,9 @@
ExporterSettingsTab_select_exporter_you_want_to_add=Select the exporter(s) you want to add
ExporterSettingsTab_template_directory_for=Template directory for
ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
+ExporterSettingsTab_select_dir=Select directory
+ExporterSettingsTab_select_path=Select path
+ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
GeneralExceptionStatusHandler_exception_while_generating_code=Exception while generating code
GeneralExceptionStatusHandler_generating_code=Generating code
PathHelper_does_not_exist={0} does not exist [{1}]
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterDefinition.java 2008-08-26 11:18:46 UTC (rev 9897)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterDefinition.java 2008-08-26 13:11:58 UTC (rev 9898)
@@ -111,9 +111,13 @@
propertyElements[i].getAttribute("description"), //$NON-NLS-1$
propertyElements[i].getAttribute("value"), //$NON-NLS-1$
Boolean.valueOf(propertyElements[i].getAttribute("required")).booleanValue()); //$NON-NLS-1$
- properties.put(property.getName(),property);
- }
- return properties;
+ String type = propertyElements[i].getAttribute("type");
+ if (type != null){
+ property.setType(type);
+ }
+ properties.put(property.getName(),property);
+ }
+ return properties;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java 2008-08-26 11:18:46 UTC (rev 9897)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java 2008-08-26 13:11:58 UTC (rev 9898)
@@ -33,6 +33,7 @@
private String defaultValue;
private String description;
private String name;
+ private String type = "string"; //$NON-NLS-1$
private boolean required;
public ExporterProperty () { }
@@ -43,6 +44,12 @@
this.defaultValue = defaultValue;
this.required = required;
}
+
+ public ExporterProperty (String name, String description, String defaultValue, boolean required, String type)
+ {
+ this(name, description, defaultValue, required);
+ setType( type );
+ }
public String getDefaultValue() {
return defaultValue;
@@ -96,4 +103,18 @@
return description + " [" + name + "]"; //$NON-NLS-1$//$NON-NLS-2$
}
}
+
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-08-26 11:18:46 UTC (rev 9897)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-08-26 13:11:58 UTC (rev 9898)
@@ -1,10 +1,13 @@
package org.hibernate.eclipse.launch;
+import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TitleAreaDialog;
@@ -19,8 +22,12 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -34,15 +41,24 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.model.impl.ExporterFactory;
import org.hibernate.eclipse.console.model.impl.ExporterProperty;
+import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
import org.hibernate.util.StringHelper;
public class AddPropertyDialog extends TitleAreaDialog {
private final ExporterFactory ef;
private ComboViewer propertyCombo;
- private Text value;
+ private Control value;
+ private Button browseButton;
private String propertyName;
private String propertyValue;
+ private ModifyListener modifyListener = new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ updateStatus();
+ }
+
+ };
protected AddPropertyDialog(Shell parentShell, ExporterFactory ef) {
super( parentShell );
@@ -56,35 +72,41 @@
Composite composite = new Composite(control,SWT.NONE);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout(2,false);
+ GridLayout layout = new GridLayout(3,false);
layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
composite.setLayout(layout);
- ModifyListener modifyListener = new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- updateStatus();
- }
-
- };
-
Label label = new Label(composite, SWT.NONE);
label.setText( HibernateConsoleMessages.AddPropertyDialog_name );
Combo combo = new Combo(composite, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN);
- combo.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));
+ GridData pgd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
+ pgd.horizontalSpan = 2;
+ combo.setLayoutData(pgd);
combo.setFocus();
combo.addModifyListener( modifyListener );
propertyCombo = new ComboViewer(combo);
+
+ combo.addKeyListener(new KeyListener(){
+
+ public void keyPressed(KeyEvent e) {
+ disposeBrowseButton();
+ createTextValueComposite(2);
+ }
+
+ public void keyReleased(KeyEvent e) {}
+
+ });
+
label = new Label(composite, SWT.NONE);
label.setText( HibernateConsoleMessages.AddPropertyDialog_value );
value = new Text(composite, SWT.BORDER | SWT.LEAD );
value.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));
- value.addModifyListener( modifyListener );
+ ((Text)value).addModifyListener( modifyListener );
initDefaultNames(ef, propertyCombo);
@@ -151,14 +173,73 @@
viewer.addSelectionChangedListener( new ISelectionChangedListener() {
+ private SelectionListener getSelectionListener(ExporterProperty prop){
+ if ("directory".equals(prop.getType())){ //$NON-NLS-1$
+ return new SelectionListener(){
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ IPath[] paths = DialogSelectionHelper.chooseFileEntries(getShell(), PathHelper.pathOrNull(((Text)value).getText()), new Path[0],
+ HibernateConsoleMessages.ExporterSettingsTab_select_dir, HibernateConsoleMessages.ExporterSettingsTab_select_dir,
+ new String[0], true, true, false);//$NON-NLS-1$
+ if(paths!=null && paths.length==1) {
+ ((Text)value).setText( ( (paths[0]).toOSString() ) );
+ }
+ }
+ };
+ } else if ("path".equals(prop.getType())){ //$NON-NLS-1$
+ return new SelectionListener(){
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ IPath[] paths = DialogSelectionHelper.chooseFileEntries(getShell(), PathHelper.pathOrNull(((Text)value).getText()), new Path[0],
+ HibernateConsoleMessages.ExporterSettingsTab_select_path, HibernateConsoleMessages.ExporterSettingsTab_select_path,
+ new String[]{new String()}/*allow all files*/, true, true, true);//$NON-NLS-1$
+ //IPath[] paths = DialogSelectionHelper.chooseFolderEntries(getShell(), PathHelper.pathOrNull(((Text)value).getText()), "Select directories", //$NON-NLS-1$
+ // "Choose directories", true);//$NON-NLS-1$
+ if(paths!=null && paths.length > 0) {
+ String strPath = paths[0].toOSString();
+ for (int i = 1; i < paths.length; i++) {
+ strPath += File.pathSeparator + paths[i].toOSString();
+ }
+ ((Text)value).setText( strPath );
+ }
+ }
+ };
+ }
+ return null;
+ }
+
+
public void selectionChanged(SelectionChangedEvent event) {
if(value==null) return;
IStructuredSelection iss = (IStructuredSelection) event.getSelection();
if(!iss.isEmpty()) {
- value.setText( ((ExporterProperty)iss.getFirstElement()).getDefaultValue() );
+ ExporterProperty prop = (ExporterProperty)iss.getFirstElement();
+ if ("boolean".equalsIgnoreCase(prop.getType())) { //$NON-NLS-1$
+ disposeBrowseButton();
+ createComboValueComposite(new String[]{String.valueOf(true), String.valueOf(false)});
+ ((Combo)value).select(Boolean.valueOf(prop.getDefaultValue()).booleanValue() ? 0 : 1);
+ } else if ("directory".equalsIgnoreCase(prop.getType())//$NON-NLS-1$
+ || "path".equalsIgnoreCase(prop.getType())) { //$NON-NLS-1$
+ disposeBrowseButton();
+ createTextValueComposite(1);
+ ((Text) value).setText(prop.getDefaultValue());
+ createBrowseButton(getSelectionListener(prop));
+ } else {
+ disposeBrowseButton();
+ createTextValueComposite(2);
+ ((Text) value).setText(prop.getDefaultValue());
+ }
+ } else {
+ createTextValueComposite(2);
}
}
-
} );
viewer.setInput( ef );
if(viewer.getCombo().getItemCount()>0) {
@@ -166,7 +247,62 @@
}
}
-
+ private void disposeBrowseButton(){
+ if (browseButton != null){
+ Composite parent = browseButton.getParent();
+ browseButton.dispose();
+ browseButton = null;
+ parent.layout();
+ }
+ }
+
+ private void createBrowseButton(SelectionListener listener){
+ disposeBrowseButton();
+ browseButton = new Button(value.getParent(), SWT.PUSH);
+ browseButton.setText(HibernateConsoleMessages.ConsoleConfigurationTab_browse);
+ browseButton.setLayoutData(new GridData(GridData.END));
+ browseButton.addSelectionListener(listener);
+ value.getParent().layout();
+ }
+
+ private void createTextValueComposite(int span){
+ if (! (value instanceof Text)) {
+ Composite parent = value.getParent();
+ if (value != null){
+ value.dispose();
+ }
+ value = new Text(parent, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN);
+ ((Text)value).addModifyListener( modifyListener );
+ GridData vgd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
+ vgd.horizontalSpan = span;
+ value.setLayoutData(vgd);
+ } else {
+ ((GridData)value.getLayoutData()).horizontalSpan = span;
+ ((Text)value).setText(new String());
+ }
+ value.getParent().layout();
+ }
+
+ private void createComboValueComposite(String[] items){
+ if (!(value instanceof Combo)) {
+ Composite parent = value.getParent();
+ if (value != null){
+ value.dispose();
+ }
+ value = new Combo(parent, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN | SWT.READ_ONLY);
+ GridData bgd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
+ bgd.horizontalSpan = 2;
+ value.setLayoutData(bgd);
+ ((Combo)value).setItems(items);
+ ((Combo)value).addModifyListener( modifyListener );
+ if (items != null && items.length > 0){
+ ((Combo)value).select(0);
+ }
+ parent.layout();
+ }
+ }
+
+
void updateStatus() {
getEnteredValues();
@@ -215,7 +351,11 @@
}
if(value!=null) {
- propertyValue = value.getText();
+ if (value instanceof Text) {
+ propertyValue = ((Text) value).getText();
+ } else if (value instanceof Combo) {
+ propertyValue = ((Combo) value).getText();
+ }
} else {
propertyValue = null;
}
16 years, 6 months
JBoss Tools SVN: r9897 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-08-26 07:18:46 -0400 (Tue, 26 Aug 2008)
New Revision: 9897
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2681
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-26 09:58:46 UTC (rev 9896)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-26 11:18:46 UTC (rev 9897)
@@ -201,6 +201,8 @@
public static String ConsoleConfigurationWizardPage_mappings;
public static String ConsoleConfigurationWizardPage_name;
public static String ConsoleConfigurationWizardPage_name_must_specified;
+ public static String ConsoleConfigurationWizardPage_bad_name;
+ public static String ConsoleConfigurationWizardPage_bad_char;
public static String ConsoleConfigurationWizardPage_naming_strategy;
public static String ConsoleConfigurationWizardPage_need_to_specify_classpath;
public static String ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-26 09:58:46 UTC (rev 9896)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-26 11:18:46 UTC (rev 9897)
@@ -192,6 +192,8 @@
ConsoleConfigurationWizardPage_mappings=Mappings
ConsoleConfigurationWizardPage_name=&Name:
ConsoleConfigurationWizardPage_name_must_specified=A name must be specified
+ConsoleConfigurationWizardPage_bad_name={0} is an invalid configuration name.
+ConsoleConfigurationWizardPage_bad_char=''{0}'' is an invalid character in a configuration name.
ConsoleConfigurationWizardPage_naming_strategy=&Naming strategy:
ConsoleConfigurationWizardPage_need_to_specify_classpath=Need to specify a classpath when not using a project classpath
ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml=If you have both 'Property file' and 'Configuration file', the settings of 'Configuration file' will override the settings used in 'Property file'.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-26 09:58:46 UTC (rev 9896)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-26 11:18:46 UTC (rev 9897)
@@ -38,6 +38,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IJavaElement;
@@ -78,7 +79,6 @@
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.hibernate.cfg.NamingStrategy;
-import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.EclipseConsoleConfiguration;
import org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences;
@@ -693,22 +693,10 @@
persistenceUnitNameText.setEnabled( getConfigurationMode().equals( ConfigurationMode.JPA) );
- if(getConfigurationName()==null || getConfigurationName().trim().length() == 0) {
- updateStatus(HibernateConsoleMessages.ConsoleConfigurationWizardPage_name_must_specified);
+ String error = verifyConfigurationName();
+ if (error != null){
+ updateStatus(error);
return;
- } else {
- if(oldConfiguaration==null){
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- try {
- if (lm.isExistingLaunchConfigurationName(getConfigurationName())){
-
- updateStatus(HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist);
- return;
- }
- } catch (CoreException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(e.getMessage(), e);
- }
- }
}
if(getProjectName()!=null && StringHelper.isNotEmpty(getProjectName().trim())) {
@@ -766,7 +754,46 @@
updateStatus(null);
}
+
+ private String verifyConfigurationName(){
+ String currentName = getConfigurationName().trim();
+ if (currentName == null || currentName.length() < 1) {
+ return HibernateConsoleMessages.ConsoleConfigurationWizardPage_name_must_specified;
+ }
+
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ try {
+ if (lm.isExistingLaunchConfigurationName(currentName)) {
+ return HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist;
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(e.getMessage(), e);
+ }
+
+ if (Platform.OS_WIN32.equals(Platform.getOS())) {
+ String[] badnames = new String[] { "aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ for (int i = 0; i < badnames.length; i++) {
+ if (currentName.equals(badnames[i])) {
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_name, currentName);
+ }
+ }
+ }
+ // See if name contains any characters that we deem illegal.
+ // '@' and '&' are disallowed because they corrupt menu items.
+ char[] disallowedChars = new char[] { '@', '&', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' };
+ for (int i = 0; i < disallowedChars.length; i++) {
+ char c = disallowedChars[i];
+ if (currentName.indexOf(c) > -1) {
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_char, c);
+ }
+ }
+
+ return null;
+ }
+
String getProjectName() {
return projectNameText.getText();
}
16 years, 6 months
JBoss Tools SVN: r9896 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-08-26 05:58:46 -0400 (Tue, 26 Aug 2008)
New Revision: 9896
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-391 - updating the section about adjusting jboss server container preferences
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml 2008-08-26 09:57:42 UTC (rev 9895)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml 2008-08-26 09:58:46 UTC (rev 9896)
@@ -1,255 +1,357 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="manage" xreflabel="manage">
- <?dbhtml filename="manage.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Deploy</keyword>
- <keyword>Deployment</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Manage JBoss AS from JBoss Developer Studio</title>
-
- <para>In this chapter we'll focus more on how to operate the JBoss AS from JBoss Developer Studio.</para>
- <para>JBoss Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of JBoss Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
- <section id="JBossbundled">
- <?dbhtml filename="JBossbundled.html"?>
- <title>How to Manage the JBoss AS Bundled in JBDS</title>
- <para>This section covers the basics of working with the JBoss server supported directly by JBDS via bundled AS plug-in. To read more about AS plug-in, read <ulink url="&aslink;">Server Manager guide</ulink>.</para>
- <section id="StartingServer">
- <?dbhtml filename="StartingServer.html"?>
- <title>Starting JBoss server</title>
- <para>Starting <property>JBoss server</property> is quite simple. JBoss Developer Studio allows you to control its behaviour with the help of a special toolbar: where you could start it in a regular or debug mode, stop it or restart it.</para>
- <itemizedlist>
- <listitem><para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis><property>Window > Show View > Other > Server > JBoss Server View</property></emphasis></para></listitem>
- </itemizedlist>
- <figure>
-<title>Starting from Icon</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_1.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <?dbhtml filename="manage.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
-<figure>
-<title>Starting from JBoss Server View</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_2.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <title>Manage JBoss AS from JBoss Developer Studio</title>
-<para>While launching, server output is written to the Console view:</para>
+ <para>In this chapter we'll focus more on how to operate the <property>JBoss
+ AS</property> from <property>JBoss Developer Studio</property>.</para>
+ <para><property>JBoss Developer Studio</property> ships with <property>JBoss EAP
+ v.4.2</property> bundled. When you followed the default installation of <property>JBoss
+ Developer Studio</property>, you should already have a JBoss 4.2 Server installed and
+ defined. To run JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although
+ you may be able to start the server with it.</para>
-<figure>
-<title>Console Output</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_3.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>When the server is started you should see <emphasis><property>Started</property></emphasis> right to its name in <property>JBoss Server View</property> (column "Status").</para>
-<figure>
-<title>Server is Started</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_4.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>To see event log after the server is started, expand <property>Event Log</property> branch beneath JBoss Server View:</para>
-<figure>
-<title>Event Log</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_5.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- </section>
- <section id="StoppingJBoss">
- <?dbhtml filename="StoppingJBoss.html"?>
- <title>Stopping JBoss Server</title>
- <para>To stop the server, click the <emphasis><property>Stop</property></emphasis> icon in JBoss Server View or right click the server name and press <emphasis><property>Stop</property></emphasis>.</para>
- <figure>
-<title>Stopping Server</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_6.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>When the server is stopped you will see <emphasis><property>Stopped</property></emphasis> next to its name in the Status column.</para>
- </section>
- <section id="ServerPreferences">
- <?dbhtml filename="ServerPreferences.html"?>
- <title>Server Container Preferences</title>
- <para>You can control how JBoss Developer Studio interacts with servlet containers in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
- <figure>
-<title>Server Preferences</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_7.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>Also you can double click the server name in JBoss Server View and open an overview of the server. Here you can specify some common settings: host name, server name, runtime and so on.</para>
-<figure>
-<title>Server Overview</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_8.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <section id="JBossbundled">
+ <?dbhtml filename="JBossbundled.html"?>
+ <title>How to Manage the JBoss AS Bundled in JBDS</title>
+ <para>This section covers the basics of working with the <property>JBoss Server</property>
+ supported directly by <property>JBDS</property> via bundled AS plug-in. To read more
+ about AS plug-in, refer to the <ulink url="&aslink;">Server Manager guide</ulink>.</para>
- </section>
- </section>
- <section id="JBossInstances">
- <?dbhtml filename="JBossInstances.html"?>
- <title>How to Use Your Own JBoss AS Instance with JBDS</title>
- <para>Although JBoss Developer Studio works closely with <property>JBoss EAP 4.2</property> we do not ultimately tie you to any particular server for deployment. There are some servers that Studio supports directly (via the bundled Eclipse WTP plug-ins).
-
- In this section we discuss how to manage self-installed JBoss AS. Suppose you want to deploy the application to <property>JBoss 4.2.1 server</property>. First of all you need to install it.</para>
- <section id="JBossInstalling">
- <?dbhtml filename="JBossInstalling.html"?>
- <title>JBoss AS Installation</title>
- <itemizedlist>
-<listitem><para>Download the binary package of <property>JBoss 4.2.1</property> and save it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para></listitem>
-</itemizedlist>
- <para>It does not matter where on your system you install JBoss server.</para>
-
- <note>
- <title>Note:</title>
- <para>The installation of JBoss server into a directory that has a name containing spaces provokes problems in some situations with Sun-based VMs. Try to avoid using installation folders that have spaces in their names.</para>
- </note>
+ <section id="StartingServer">
+ <?dbhtml filename="StartingServer.html"?>
+ <title>Starting JBoss Server</title>
+ <para>Starting <property>JBoss Server</property> is quite simple. <property>JBoss
+ Developer Studio</property> allows you to control its behaviour with the help of
+ a special toolbar: where you could start it in a regular or debug mode, stop it or
+ restart it.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To launch the server click the green-with-white-arrow icon on the
+ <property>JBoss Server View </property>or right click server name in
+ this view and select <emphasis>
+ <property>Start</property>
+ </emphasis>. If this view is not open, select <emphasis>
+ <property>Window > Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Starting from Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Starting from JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>While launching, server output is written to the <property>Console
+ view</property>:</para>
+
+ <figure>
+ <title>Console Output</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is started you should see <emphasis>
+ <property>Started</property>
+ </emphasis> right to its name in <property>JBoss Server View</property> (column
+ "Status").</para>
+ <figure>
+ <title>Server is Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To see event log after the server is started, expand <property>Event
+ Log</property> branch beneath <property>JBoss Server View</property>:</para>
+ <figure>
+ <title>Event Log</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StoppingJBoss">
+ <?dbhtml filename="StoppingJBoss.html"?>
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the <emphasis>
+ <property>Stop</property>
+ </emphasis> icon in <property>JBoss Server view</property> or right click the server
+ name and press <emphasis>
+ <property>Stop</property>
+ </emphasis>.</para>
+ <figure>
+ <title>Stopping Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is stopped you will see <emphasis>
+ <property>Stopped</property>
+ </emphasis> next to its name in the Status column.</para>
+ </section>
+ <section id="ServerPreferences" role="updated">
+ <?dbhtml filename="ServerPreferences.html"?>
+ <title>Server Container Preferences</title>
+ <para>You can control how <property>JBoss Developer Studio</property> interacts with server containers in the
+ <property>Server editor</property>. Double-click the server to open it in the editor.</para>
+
+ <figure>
+ <title>Server Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here you can specify some common settings: host name, server
+ name, runtime as well as settings related to the publishing, timeouts and server ports.</para>
+
+ </section>
+ </section>
- <para>There is no requirement for root access to run JBoss Server on UNIX/Linux systems because none of the default ports are within the 0-1023 privileged port range.</para>
-<itemizedlist>
-<listitem><para>After you have the binary archive you want to install, use the JDK jar tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip archive contents into a location of your choice. The jboss-4.2.1.tgz archive is a gzipped tar file that requires a gnutar compatible tar which can handle the long pathnames in the archive. The extraction process will create a jboss-4.2.1 directory. </para></listitem>
-</itemizedlist>
-</section>
-
- <section id="AddingJBossServer">
- <?dbhtml filename="AddingJBossServer.html"?>
- <title>Adding and configuring JBoss server</title>
- <para>Now we should add just installed server into server manager in JBoss Developer Studio.</para>
- <itemizedlist>
- <listitem><para>Open the JBoss Server View by selecting <emphasis><property>Window > Show View > Other > Server > JBoss Server View</property></emphasis>. You will see JBoss Server view.</para></listitem>
- <listitem><para>Right click anywhere in this view and select <emphasis><property>New Server</property></emphasis>.</para></listitem>
- <listitem><para>Select <emphasis><property>JBoss, a division of Red Hat > JBoss v4.2</property></emphasis> and click the <emphasis><property>Installed Runtimes</property></emphasis> button to select a new installed runtime.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Selecting Server Type</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_9.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
- <itemizedlist>
- <listitem><para>Click <emphasis><property>Add</property></emphasis> button to add a new jboss runtime.</para></listitem>
- <listitem><para>Select <emphasis><property>JBoss, a division of Red Hat > JBoss v4.2</property></emphasis> and press <emphasis><property>Next</property></emphasis>.</para></listitem>
- </itemizedlist>
+ <section id="JBossInstances">
+ <?dbhtml filename="JBossInstances.html"?>
+ <title>How to Use Your Own JBoss AS Instance with JBDS</title>
+ <para>Although <property>JBoss Developer Studio</property> works closely with <property>JBoss EAP 4.2</property>
+ we do not ultimately tie you to any particular server for deployment. There are some
+ servers that Studio supports directly (via the bundled Eclipse WTP plug-ins). In this
+ section we discuss how to manage self-installed JBoss AS. Suppose you want to deploy the
+ application to <property>JBoss 4.2.1 server</property>. First of all you need to install
+ it.</para>
+ <section id="JBossInstalling">
+ <?dbhtml filename="JBossInstalling.html"?>
+ <title>JBoss AS Installation</title>
+ <itemizedlist>
+ <listitem>
+ <para>Download the binary package of <property>JBoss 4.2.1</property> and save
+ it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads"
+ >http://labs.jboss.com/jbossas/downloads</ulink></para>
+ </listitem>
+ </itemizedlist>
+ <para>It does not matter where on your system you install JBoss server.</para>
- <figure>
-<title>Installed Runtimes</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_10.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <note>
+ <title>Note:</title>
+ <para>The installation of JBoss server into a directory that has a name containing
+ spaces provokes problems in some situations with Sun-based VMs. Try to avoid
+ using installation folders that have spaces in their names.</para>
+ </note>
+ <para>There is no requirement for root access to run JBoss Server on UNIX/Linux systems
+ because none of the default ports are within the 0-1023 privileged port range.</para>
+ <itemizedlist>
+ <listitem>
+ <para>After you have the binary archive you want to install, use the JDK jar
+ tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip
+ archive contents into a location of your choice. The jboss-4.2.1.tgz archive
+ is a gzipped tar file that requires a gnutar compatible tar which can handle
+ the long pathnames in the archive. The extraction process will create a
+ jboss-4.2.1 directory. </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="AddingJBossServer">
+ <?dbhtml filename="AddingJBossServer.html"?>
+ <title>Adding and configuring JBoss Server</title>
+ <para>Now we should add just installed server into server manager in <property>JBoss Developer
+ Studio</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the JBoss Server View by selecting <emphasis>
+ <property>Window > Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis>. You will see JBoss Server view.</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere in this view and select <emphasis>
+ <property>New Server</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>JBoss, a division of Red Hat > JBoss v4.2</property>
+ </emphasis> and click the <emphasis>
+ <property>Installed Runtimes</property>
+ </emphasis> button to select a new installed runtime.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Selecting Server Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
-<itemizedlist>
-<listitem><para>In the next step make JBoss Developer Studio to know where you have installed the server and define JRE.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Defining JBoss Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_11.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<note>
- <title>Note:</title>
- <para>When adding a new server you will need to specify what JRE to use. It is important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web applications, JRE will not be enough.</para>
-</note>
-<itemizedlist>
- <listitem><para>In the following window leave all settings default or give your name to a new jboss server and press <emphasis><property>Finish</property></emphasis>.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Adding New Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_12.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>A new runtime will now appear in the <emphasis><property>Preferences > Server > Installed Runtimes</property></emphasis> dialog.</para>
-<figure>
-<title>Runtime is Added</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_13.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Add</property>
+ </emphasis> button to add a new JBoss runtime.</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>JBoss, a division of Red Hat > JBoss v4.2</property>
+ </emphasis> and press <emphasis>
+ <property>Next</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
-<itemizedlist>
- <listitem><para>Click <emphasis><property>OK</property></emphasis>. Then select a new added runtime in Server runtime drop down list and click <emphasis><property>Next</property></emphasis> button twice.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Choosing Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_14.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<itemizedlist>
- <listitem><para>In the next dialog verify a <property>JBoss</property> runtime information and if something is unfair go back and correct it.</para></listitem>
- </itemizedlist>
- <figure>
-<title>Configuring Projects</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_15.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <itemizedlist>
- <listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click <emphasis><property>Finish</property></emphasis>.</para></listitem>
- </itemizedlist>
- <figure>
-<title>Configuring Projects</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_16.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>A new JBoss server should now appear in JBoss Server View.</para>
-<figure>
-<title>New JBoss Server</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_17.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+ <figure>
+ <title>Installed Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- </section>
- </section>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>In the next step make JBoss Developer Studio to know where you have
+ installed the server and define JRE.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Defining JBoss Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When adding a new server you will need to specify what JRE to use. It is
+ important to set this value to a full JDK, not JRE. Again, you need a full JDK
+ to run Web applications, JRE will not be enough.</para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>In the following window leave all settings default or give your name to a
+ new jboss server and press <emphasis>
+ <property>Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Adding New Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A new runtime will now appear in the <emphasis>
+ <property>Preferences > Server > Installed Runtimes</property>
+ </emphasis> dialog.</para>
+ <figure>
+ <title>Runtime is Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property>OK</property>
+ </emphasis>. Then select a new added runtime in Server runtime drop down
+ list and click <emphasis>
+ <property>Next</property>
+ </emphasis> button twice.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Choosing Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the next dialog verify a <property>JBoss</property> runtime information
+ and if something is unfair go back and correct it.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_15.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the last wizard's dialog modify the projects that are
+ configured on the server and click <emphasis>
+ <property>Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A new JBoss server should now appear in JBoss Server View.</para>
+ <figure>
+ <title>New JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
<para>Now, we are ready to create the first web application.</para>
</chapter>
16 years, 6 months
JBoss Tools SVN: r9895 - trunk/documentation/guides/GettingStartedGuide/en/images/manage.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-08-26 05:57:42 -0400 (Tue, 26 Aug 2008)
New Revision: 9895
Modified:
trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_2.png
trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_4.png
trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_5.png
trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_8.png
Log:
https://jira.jboss.org/jira/browse/JBDS-391 - updating the screens
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_2.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_5.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_8.png
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Tools SVN: r9894 - workspace/dart/plugins/trunk/org.jboss.tools.smooks.core.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-26 04:39:20 -0400 (Tue, 26 Aug 2008)
New Revision: 9894
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.core/plugin.xml
Log:
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.core/plugin.xml
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.core/plugin.xml 2008-08-26 08:35:46 UTC (rev 9893)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.core/plugin.xml 2008-08-26 08:39:20 UTC (rev 9894)
@@ -2,37 +2,5 @@
<?eclipse version="3.2"?>
<plugin>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="Sample Category"
- id="org.jboss.tools.smooks.core">
- </category>
- <view
- name="Sample View"
- icon="icons/sample.gif"
- category="org.jboss.tools.smooks.core"
- class="org.jboss.tools.smooks.core.views.SampleView"
- id="org.jboss.tools.smooks.core.views.SampleView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.jdt.ui.JavaPerspective">
- <view
- ratio="0.5"
- relative="org.eclipse.ui.views.TaskList"
- relationship="right"
- id="org.jboss.tools.smooks.core.views.SampleView">
- </view>
- </perspectiveExtension>
- </extension>
- <extension
- point="org.eclipse.help.contexts">
- <contexts
- file="contexts.xml">
- </contexts>
- </extension>
</plugin>
16 years, 6 months
JBoss Tools SVN: r9893 - in workspace/dart/plugins: trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-26 04:35:46 -0400 (Tue, 26 Aug 2008)
New Revision: 9893
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java
Log:
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-08-26 08:32:14 UTC (rev 9892)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-08-26 08:35:46 UTC (rev 9893)
@@ -101,7 +101,6 @@
protected void hookFileTextModifyListener() {
final ModifyListener modifyListener = new ModifyListener() {
- @Override
public void modifyText(ModifyEvent e) {
changeWizardPageStatus();
}
@@ -225,7 +224,6 @@
tableViewer.addCheckStateListener(new ICheckStateListener() {
boolean flag = true;
- @Override
public void checkStateChanged(CheckStateChangedEvent event) {
if (flag) {
Object checkObject = event.getElement();
@@ -282,12 +280,10 @@
}
- @Override
public void widgetDefaultSelected(SelectionEvent e) {
widgetSelected(e);
}
- @Override
public void widgetSelected(SelectionEvent e) {
changeWizardPageStatus();
}
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java 2008-08-26 08:32:14 UTC (rev 9892)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java 2008-08-26 08:35:46 UTC (rev 9893)
@@ -204,7 +204,6 @@
/* (non-Javadoc)
* @see org.eclipse.swt.events.TreeListener#treeCollapsed(org.eclipse.swt.events.TreeEvent)
*/
- @Override
public void treeCollapsed(TreeEvent e) {
}
@@ -212,7 +211,6 @@
/* (non-Javadoc)
* @see org.eclipse.swt.events.TreeListener#treeExpanded(org.eclipse.swt.events.TreeEvent)
*/
- @Override
public void treeExpanded(TreeEvent e) {
TreeItem item = (TreeItem)e.item;
if(item.getChecked()){
16 years, 6 months
JBoss Tools SVN: r9892 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-08-26 04:32:14 -0400 (Tue, 26 Aug 2008)
New Revision: 9892
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-391 - adding info about possibility to change the ports in the server editor
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-08-26 08:30:58 UTC (rev 9891)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-08-26 08:32:14 UTC (rev 9892)
@@ -72,8 +72,9 @@
incremental publish if it turns out that the module in question is capable of doing one.</para>
<para>Now, let's get to know with both of the <property>JBoss Server
- View</property> parts.</para>
- <section>
+ View</property> parts.</para>
+
+ <section role="updated">
<title>Top Part of the JBoss Server View</title>
<para>In the top part of the <property>JBoss Server View</property> all declared servers
are represented as well as their current states, that is, whether they are started
@@ -154,8 +155,21 @@
</mediaobject>
</figure>
- <para id="com_line_arg">The editor will also allow you to modify that server's
- launch configuration. It's just after clicking <emphasis>
+ <para>It should be pointed out that our server adapter by default tries to automatically
+ detect the ports it needs for integrating with a <property>JBoss server</property>.
+ Sometimes it can though be relevant to override this automatic detection if you are
+ using some custom configuration. For this purposes the <emphasis>
+ <property>Server Ports</property>
+ </emphasis> section in the <property>Server editor</property> is provided where the
+ port settings are configurable.</para>
+
+ <para>The settings relating to <emphasis>
+ <property>Publishing</property></emphasis>, <emphasis>
+ <property>Timeouts</property></emphasis> or <emphasis>
+ <property>Server Polling</property></emphasis> can also be adjusted here.</para>
+
+ <para id="com_line_arg">In the <property>Server editor</property> it's possible to modify the server's
+ launch configuration as well. It's just after clicking <emphasis>
<property>Open launch configuration</property>
</emphasis> link. In the open window there are the tabs for setting command line
arguments and other things that are relevant to launching the server.</para>
16 years, 6 months