Author: vyemialyanchyk
Date: 2007-12-20 12:41:29 -0500 (Thu, 20 Dec 2007)
New Revision: 5408
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IJSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java
Log:
code revert for
http://jira.jboss.com/jira/browse/JBIDE-1457 &
http://jira.jboss.com/jira/browse/JBIDE-788
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IJSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IJSPTextEditor.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IJSPTextEditor.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -19,5 +19,4 @@
public void runDropCommand(String flavor, String data);
public void setVPEController(IVisualController c);
public IVisualController getVPEController();
- public IVisualContext getPageContext();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -616,9 +616,14 @@
}
public VpeTaglibManager getTaglibManager() {
- sourceEditor.getPageContext();
- if (null != sourceEditor) {
- return sourceEditor.getPageContext();
+ if (visualEditor != null) {
+ IVisualController controller = visualEditor.getController();
+ if (controller != null) {
+ IVisualContext context = controller.getPageContext();
+ if (context != null) {
+ return context;
+ }
+ }
}
return null;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -78,9 +78,7 @@
import
org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator;
import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.model.XModelBuffer;
@@ -111,7 +109,6 @@
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.editor.IJSPTextEditor;
import org.jboss.tools.jst.jsp.editor.ITextFormatter;
-import org.jboss.tools.jst.jsp.editor.IVisualContext;
import org.jboss.tools.jst.jsp.editor.IVisualController;
import org.jboss.tools.jst.jsp.outline.JSPContentOutlineConfiguration;
import org.jboss.tools.jst.jsp.outline.JSPPropertySheetConfiguration;
@@ -126,7 +123,6 @@
import org.w3c.dom.DocumentType;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
/**
@@ -413,9 +409,6 @@
}
public void updateModification() {
- //
- getPageContext().refreshBundleValues();
- //
XModelObject object = getModelObject();
if (object != null && !object.isModified() && isModified()) {
setModified(false);
@@ -608,8 +601,8 @@
}
public VpeTaglibManager getTaglibManager() {
- if (editor != null) {
- return editor.getPageContext();
+ if (provider != null) {
+ return provider.getTaglibManager();
}
return null;
}
@@ -1137,17 +1130,4 @@
}
return false;
}
-
- protected JSPTextEditorPageContext pageContext = null;
-
- public IVisualContext getPageContext() {
- if (null == pageContext) {
- pageContext = new JSPTextEditorPageContext();
- }
- //IDocument document = getTextViewer().getDocument();
- //pageContext.setDocument(document);
- IDOMDocument document = ((DOMModelImpl)getModel()).getDocument();
- pageContext.setDocument(document);
- return pageContext;
- }
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -38,7 +38,6 @@
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.contentassist.RedHatHtmlContentAssistProcessor;
import org.jboss.tools.jst.jsp.editor.IVisualController;
-import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditorPageContext;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -78,12 +77,6 @@
public void setTarget(INodeNotifier target) {
if(fNode == target) return;
fNode = (target instanceof Node) ? (Node) target : null;
- // BEGIN
- JSPTextEditorPageContext pageContext =
(JSPTextEditorPageContext)valueHelper.getTaglibManager();
- if (null != pageContext) {
- pageContext.setReferenceNode(fNode);
- }
- // END
if (fNode instanceof IDOMNode) {
Document ownerDocument = fNode.getOwnerDocument();
if (ownerDocument == null && fNode instanceof Document) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -96,8 +96,11 @@
IEditorPart editor =
ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if(!(editor instanceof JSPMultiPageEditor)) return false;
JSPTextEditor jspEditor = ((JSPMultiPageEditor)editor).getJspEditor();
- // vitali: new version - here we use original org.jboss.tools.jst.jsp this plugin page
context
- pageContext = jspEditor.getPageContext();
+ IVisualEditor v = ((JSPMultiPageEditor)editor).getVisualEditor();
+ if(v == null) return false;
+ IVisualController c = v.getController();
+ if(c == null) return false;
+ pageContext = c.getPageContext();
editorInput = jspEditor.getEditorInput();
wtpTextJspKbConnector = jspEditor.getWTPTextJspKbConnector();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java 2007-12-20
17:41:19 UTC (rev 5407)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java 2007-12-20
17:41:29 UTC (rev 5408)
@@ -39,11 +39,4 @@
protected VpePreference(String optionPath, String attributeName) {
super(optionPath, attributeName);
}
-
- public static boolean isAbsolutePosition() {
- if ("yes".equals(VpePreference.USE_ABSOLUTE_POSITION.getValue())) {
- return true;
- }
- return false;
- }
}
\ No newline at end of file