Author: ayukhovich
Date: 2007-10-03 05:14:52 -0400 (Wed, 03 Oct 2007)
New Revision: 3989
Added:
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/.options
Modified:
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ExtendedStructuredTextViewerConfigurationHTML.java
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
Log:
Initial commit
Added: branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/.options
===================================================================
--- branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/.options
(rev 0)
+++
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/.options 2007-10-03
09:14:52 UTC (rev 3989)
@@ -0,0 +1,2 @@
+org.jboss.tools.jst.jsp/debug/tldcmdocument/cache=false
+org.jboss.tools.jst.jsp/debug/tldcmdocument/manager=false
\ No newline at end of file
Modified:
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ExtendedStructuredTextViewerConfigurationHTML.java
===================================================================
---
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ExtendedStructuredTextViewerConfigurationHTML.java 2007-10-02
23:57:05 UTC (rev 3988)
+++
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ExtendedStructuredTextViewerConfigurationHTML.java 2007-10-03
09:14:52 UTC (rev 3989)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.formatter.IContentFormatter;
import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
@@ -142,4 +143,5 @@
formatter.setMasterStrategy(new StructuredFormattingStrategy(new
HTMLFormatProcessor()));
return formatter;
}
+
}
\ No newline at end of file
Modified:
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
===================================================================
---
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2007-10-02
23:57:05 UTC (rev 3988)
+++
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2007-10-03
09:14:52 UTC (rev 3989)
@@ -23,6 +23,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
@@ -30,7 +31,9 @@
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.text.xml.XmlEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.XHTMLTaglibController;
import org.jboss.tools.jst.jsp.preferences.JSPOccurrencePreferenceConstants;
+import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
@@ -41,7 +44,18 @@
//Resource bundle.
private ResourceBundle resourceBundle;
- public static final String PLUGIN_ID = "org.jboss.tools.jst.jsp";
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.jsp";
+
+
+ public static final boolean DEBIG_TLDCMDOCUMENT_MANAGER;
+ public static final boolean DEBIG_TLDCMDOCUMENT_CACHE;
+ public static final boolean DEBIG_INFO;
+
+ static {
+ DEBIG_TLDCMDOCUMENT_MANAGER =
"true".equalsIgnoreCase(Platform.getDebugOption( PLUGIN_ID +
"/debug/tldcmdocument/manager"));
+ DEBIG_TLDCMDOCUMENT_CACHE = "true".equalsIgnoreCase(Platform.getDebugOption(
PLUGIN_ID + "/debug/tldcmdocument/cache"));
+ DEBIG_INFO = "true".equalsIgnoreCase(Platform.getDebugOption( PLUGIN_ID +
"/debug/info"));
+ }
/**
@@ -159,4 +173,23 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
+
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ TaglibIndex.startup();
+ XHTMLTaglibController.startup();
+ }
+
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+
+ TaglibIndex.shutdown();
+ super.stop(context);
+ }
+
+
}
Modified:
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
===================================================================
---
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-10-02
23:57:05 UTC (rev 3988)
+++
branches/jbosstools_ve_codeassistant/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-10-03
09:14:52 UTC (rev 3989)
@@ -259,7 +259,20 @@
wtpKbConnector.registerResource(resource);
}
return true;
+ } else {
+ TLDEditorDocumentManager manager2 =
XHTMLTaglibController.getTLDCMDocumentManager(document);
+ if(manager2 != null) {
+ List list = manager2.getTaglibTrackers();
+ for (int i = 0; i < list.size(); i++) {
+ TaglibTracker tracker = (TaglibTracker)list.get(i);
+ if(tracker == null) continue;
+ String version = TLDVersionHelper.getTldVersion(tracker);
+ KbTldResource resource = new KbTldResource(tracker.getURI(), "",
tracker.getPrefix(), version);
+ wtpKbConnector.registerResource(resource);
+ }
+ return true;
}
+ }
return false;
}
Show replies by date