Author: scabanovich
Date: 2009-04-17 10:14:22 -0400 (Fri, 17 Apr 2009)
New Revision: 14798
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBLinkHyperlink.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBXMLLinkHyperlinkPartitioner.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-17 11:16:22 UTC (rev
14797)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-17 14:14:22 UTC (rev
14798)
@@ -44,4 +44,87 @@
<extension point="org.jboss.tools.common.model.ui.attributeEditor">
<attributeEditor
class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor"
id="ESBBusList"/>
</extension>
+
+
+ <extension
+ point="org.jboss.tools.common.text.ext.hyperlinkPartitioner"
+ id="org.jboss.tools.esb.ui.hyperlinkPartitioner"
+ name="org.jboss.tools.esb.ui.hyperlinkPartitioner">
+
+ <hyperlinkPartitioner
+
id="org.jboss.tools.common.text.ext.jsf.hyperlink.XMLClassHyperlinkPartitioner"
+
class="org.jboss.tools.common.text.ext.hyperlink.xml.XMLClassHyperlinkPartitioner">
+
+ <contentType id="org.eclipse.wst.xml.core.xmlsource">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="/jbossesb/services/service/actions/action/class"
/>
+ </partitionType>
+ </contentType>
+ <contentType id="org.eclipse.core.runtime.xml">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="/jbossesb/services/service/actions/action/class"
/>
+ </partitionType>
+ </contentType>
+
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="/jbossesb/services/service/actions/action/class"
/>
+ </partitionType>
+ </contentType>
+
+ </hyperlinkPartitioner>
+
+
+ <hyperlinkPartitioner
+ id="org.jboss.tools.esb.ui.hyperlink.ESBXMLLinkHyperlinkPartitioner"
+
class="org.jboss.tools.esb.ui.hyperlink.ESBXMLLinkHyperlinkPartitioner">
+ <contentType id="org.eclipse.wst.xml.core.xmlsource">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/inXsd" />
+ <axis path="*/service/actions/outXsd" />
+ <axis path="*/service/actions/faultXsd" />
+ </partitionType>
+ </contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/inXsd" />
+ <axis path="*/service/actions/outXsd" />
+ <axis path="*/service/actions/faultXsd" />
+ </partitionType>
+ </contentType>
+ <contentType id="org.eclipse.core.runtime.xml">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/inXsd" />
+ <axis path="*/service/actions/outXsd" />
+ <axis path="*/service/actions/faultXsd" />
+ </partitionType>
+ </contentType>
+
+ </hyperlinkPartitioner>
+
+ </extension>
+
+ <extension
+ point="org.jboss.tools.common.text.ext.hyperlink"
+ id="org.jboss.tools.esb.ui.hyperlink"
+ name="org.jboss.tools.esb.ui.hyperlink">
+
+ <hyperlink
+ class="org.jboss.tools.esb.ui.hyperlink.ESBLinkHyperlink"
+ id="org.jboss.tools.esb.ui.hyperlink.ESBLinkHyperlink">
+ <contenttypeidentifier id="org.eclipse.wst.xml.core.xmlsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.ESB_XML_LINK"
/>
+ </contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.core.runtime.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.ESB_XML_LINK"
/>
+ </contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.ESB_XML_LINK"
/>
+ </contenttypeidentifier>
+ </hyperlink>
+
+
+ </extension>
+
+
</plugin>
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBLinkHyperlink.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBLinkHyperlink.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBLinkHyperlink.java 2009-04-17
14:14:22 UTC (rev 14798)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.esb.ui.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.common.text.ext.hyperlink.LinkHyperlink;
+
+/**
+ * @author Jeremy
+ */
+public class ESBLinkHyperlink extends LinkHyperlink {
+
+ protected IFile getFileFromProject(String fileName) {
+ if(fileName == null || fileName.length() == 0) return null;
+ IFile documentFile = getFile();
+ if(documentFile == null) return null;
+ IProject project = documentFile.getProject();
+ return super.getFileFromProject(updateFilenameForModel(fileName, project));
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBLinkHyperlink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBXMLLinkHyperlinkPartitioner.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBXMLLinkHyperlinkPartitioner.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBXMLLinkHyperlinkPartitioner.java 2009-04-17
14:14:22 UTC (rev 14798)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.esb.ui.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.IDocument;
+
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.xml.XMLLinkHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+
+/**
+ * @author Jeremy
+ */
+public class ESBXMLLinkHyperlinkPartitioner extends XMLLinkHyperlinkPartitioner {
+ public static final String ESB_XML_LINK_PARTITION =
"org.jboss.tools.common.text.ext.xml.ESB_XML_LINK";
+
+ /**
+ * @see
org.jboss.tools.common.text.ext.hyperlink.XMLLinkHyperlinkPartitioner#getPartitionType()
+ */
+ protected String getPartitionType() {
+ return ESB_XML_LINK_PARTITION;
+ }
+
+ /**
+ * @see
com.ibm.sse.editor.extensions.hyperlink.IHyperlinkPartitionRecognizer#recognize(org.eclipse.jface.text.IDocument,
com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
+ */
+ public boolean recognize(IDocument document, IHyperlinkRegion region) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ smw.init(document);
+ try {
+ IFile documentFile = smw.getFile();
+ IProject project = documentFile.getProject();
+
+ return true;
+ } finally {
+ smw.dispose();
+ }
+ }
+
+}
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBXMLLinkHyperlinkPartitioner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain