woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor ComponentEditorPart.java,1.5,1.6 ComponentEditorOutline.java,1.1,1.2 EmptyOutlinePage.java,1.1,1.2 ComponentEditor.java,1.6,1.7

[email protected]
Newsgroups gmane.comp.web.webobjects.woproject.cvs
Message-ID <[email protected]>
Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20334/java/org/objectstyle/wolips/componenteditor/editor

Modified Files:
	ComponentEditorPart.java ComponentEditorOutline.java 
	EmptyOutlinePage.java ComponentEditor.java 
Log Message:
html preview

Index: ComponentEditorPart.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor/ComponentEditorPart.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ComponentEditorPart.java	26 Dec 2005 14:37:39 -0000	1.5
+++ ComponentEditorPart.java	26 Dec 2005 16:22:07 -0000	1.6
@@ -70,17 +70,20 @@
 import org.eclipse.ui.part.MultiPageEditorPart;
 import org.eclipse.ui.part.MultiPageSelectionProvider;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-import org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage;
 import org.objectstyle.wolips.apieditor.editor.ApiEditor;
 import org.objectstyle.wolips.componenteditor.ComponenteditorPlugin;
 import org.objectstyle.wolips.components.editor.EditorInteraction;
 import org.objectstyle.wolips.components.editor.IEmbeddedEditor;
+import org.objectstyle.wolips.components.editor.IEmbeddedEditorSelected;
 import org.objectstyle.wolips.components.input.ComponentEditorInput;
-import org.objectstyle.wolips.htmleditor.editor.HTMLOutlineSelectionHandler;
 import org.objectstyle.wolips.htmleditor.editor.StructuredTextEditorHTMLWithWebObjectTags;
+import org.objectstyle.wolips.htmlpreview.editor.HtmlPreviewEditor;
 import org.objectstyle.wolips.wodclipse.WodclipsePlugin;
 import org.objectstyle.wolips.wodclipse.wod.WodEditor;
 
+/**
+ * @author uli
+ */
 public class ComponentEditorPart extends MultiPageEditorPart {
 
 	ComponentEditorInput componentEditorInput;
@@ -98,6 +101,8 @@
 
 	public ApiEditor apiEditor;
 
+	public HtmlPreviewEditor htmlPreviewEditor;
+
 	private ComponentEditorOutline componentEditorOutline;
 
 	public ComponentEditorPart() {
@@ -138,7 +143,7 @@
 
 	protected void createPages() {
 		IEditorInput[] editorInput = componentEditorInput.getInput();
-		editorParts = new IEditorPart[editorInput.length];
+		editorParts = new IEditorPart[editorInput.length + 1];
 		Composite componentEditorParent = new Composite(getContainer(),
 				SWT.NONE);
 		componentEditorParent.setLayout(new FillLayout());
@@ -163,7 +168,7 @@
 				ComponentEditorPart.this.updateOutline();
 			}
 		});
-		for (int i = 0; i < componentEditorInput.getEditors().length; i++) {
+		for (int i = 0; i < componentEditorInput.getEditors().length + 1; i++) {
 			IEditorPart editorPart = null;
 			switch (i) {
 			case 0:
@@ -246,6 +251,16 @@
 				}
 				this.setPageText(i - 1, "Api");
 				break;
+			case 4:
+				htmlPreviewEditor = new HtmlPreviewEditor();
+				editorPart = htmlPreviewEditor;
+				try {
+					this.addPage(editorPart, editorInput[i - 3]);
+				} catch (PartInitException e) {
+					ComponenteditorPlugin.getDefault().log(e);
+				}
+				this.setPageText(i - 1, "Preview");
+				break;
 
 			default:
 				break;
@@ -429,6 +444,10 @@
 				provider.fireSelectionChanged(event);
 				provider.firePostSelectionChanged(event);
 			}
+			 if (activeEditor instanceof IEmbeddedEditorSelected) {
+				 IEmbeddedEditorSelected embeddedEditorPageChanged = (IEmbeddedEditorSelected)activeEditor;
+				 embeddedEditorPageChanged.editorSelected();
+			 }
 		}
     }
 }

Index: ComponentEditorOutline.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor/ComponentEditorOutline.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ComponentEditorOutline.java	14 Oct 2005 15:34:05 -0000	1.1
+++ ComponentEditorOutline.java	26 Dec 2005 16:22:07 -0000	1.2
@@ -60,6 +60,9 @@
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 
+/**
+ * @author uli
+ */
 public class ComponentEditorOutline extends Page implements
 		IContentOutlinePage, ISelectionProvider, ISelectionChangedListener {
 	private PageBook pagebook;

Index: EmptyOutlinePage.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor/EmptyOutlinePage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- EmptyOutlinePage.java	14 Oct 2005 15:34:05 -0000	1.1
+++ EmptyOutlinePage.java	26 Dec 2005 16:22:07 -0000	1.2
@@ -51,6 +51,9 @@
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 
+/**
+ * @author uli
+ */
 public class EmptyOutlinePage implements IContentOutlinePage {
 	private Composite control;
 

Index: ComponentEditor.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/editor/ComponentEditor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ComponentEditor.java	19 Oct 2005 07:41:52 -0000	1.6
+++ ComponentEditor.java	26 Dec 2005 16:22:07 -0000	1.7
@@ -43,9 +43,6 @@
  */
 package org.objectstyle.wolips.componenteditor.editor;
 
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.ide.IGotoMarker;
 
 /**
  * @author uli
@@ -57,9 +54,9 @@
 	}
 
 	public Object getAdapter(Class adapter) {
-		if (adapter.equals(IGotoMarker.class)) {
-			return null;
-		}
+//		if (adapter.equals(IGotoMarker.class)) {
+//			return null;
+//		}
 		return super.getAdapter(adapter);
 	}
 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.