--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
name="HTML Editor"
icon="icons/full/obj16/html.png"
extensions="html, htm, xhtml"
+ contributorClass="net.sourceforge.phpeclipse.html.ui.internal.editor.HTMLEditorActionContributor"
class="net.sourceforge.phpeclipse.html.ui.internal.editor.HTMLEditor"
id="net.sourceforge.phpeclipse.html.ui.editor">
</editor>
* Contributors:
* Christopher Lenz - initial implementation
*
- * $Id: HTMLEditor.java,v 1.1 2004-09-02 18:13:32 jsurfer Exp $
+ * $Id: HTMLEditor.java,v 1.2 2004-09-03 17:32:25 jsurfer Exp $
*/
package net.sourceforge.phpeclipse.html.ui.internal.editor;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import net.sourceforge.phpeclipse.html.ui.internal.preview.HTMLPreviewPage;
import net.sourceforge.phpeclipse.html.ui.internal.text.HTMLConfiguration;
-import net.sourceforge.phpeclipse.ui.views.preview.IBrowserPreviewPage;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import net.sourceforge.phpeclipse.xml.ui.XMLPlugin;
import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLDocumentProvider;
import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor;
import net.sourceforge.phpeclipse.xml.ui.text.XMLTextTools;
-import org.eclipse.core.resources.IFile;
import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.ContentAssistAction;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
public class HTMLEditor extends XMLEditor {
// Instance Variables ------------------------------------------------------
-
+ public HTMLEditor() {
+ super(ShowExternalPreviewAction.HTML_TYPE);
+ }
/** The associated preview page. */
- private HTMLPreviewPage previewPage;
+// private HTMLPreviewPage previewPage;
// XMLEditor Implementation ------------------------------------------------
/*
* @see org.eclipse.ui.texteditor.AbstractTextEditor#editorSaved()
*/
- protected void editorSaved() {
- if (previewPage != null) {
- previewPage.update();
- }
- }
+// protected void editorSaved() {
+// if (previewPage != null) {
+// previewPage.update();
+// }
+// }
/*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
- if (adapter == IBrowserPreviewPage.class) {
- if (previewPage == null) {
- previewPage = createPreviewPage();
- }
- return previewPage;
- }
+// if (adapter == IBrowserPreviewPage.class) {
+// if (previewPage == null) {
+// previewPage = createPreviewPage();
+// }
+// return previewPage;
+// }
return super.getAdapter(adapter);
}
/**
* Creates the HTML preview page.
*/
- private HTMLPreviewPage createPreviewPage() {
- IEditorInput input = getEditorInput();
- if (input instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) input).getFile();
- try {
- URL location = file.getLocation().toFile().toURL();
- return new HTMLPreviewPage(location);
- } catch (MalformedURLException e) { }
- }
- return null;
- }
+// private HTMLPreviewPage createPreviewPage() {
+// IEditorInput input = getEditorInput();
+// if (input instanceof IFileEditorInput) {
+// IFile file = ((IFileEditorInput) input).getFile();
+// try {
+// URL location = file.getLocation().toFile().toURL();
+// return new HTMLPreviewPage(location);
+// } catch (MalformedURLException e) { }
+// }
+// return null;
+// }
protected void createActions() {
super.createActions();
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package net.sourceforge.phpeclipse.html.ui.internal.editor;
+
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Common base class for action contributors for Java editors.
+ */
+public class HTMLEditorActionContributor extends BasicTextEditorActionContributor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ ITextEditor textEditor = null;
+ if (part instanceof ITextEditor)
+ textEditor = (ITextEditor) part;
+
+ if (textEditor != null) {
+ IFile file = null;
+ IEditorInput editorInput = textEditor.getEditorInput();
+
+ if (editorInput instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) editorInput).getFile();
+ }
+
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ fShowExternalPreviewAction.setEditor(textEditor);
+ fShowExternalPreviewAction.update();
+ if (fShowExternalPreviewAction != null)
+ fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.HTML_TYPE);
+ }
+ }
+}
+++ /dev/null
-/*
- * Copyright (c) 2004 Christopher Lenz and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Christopher Lenz - initial implementation
- *
- * $Id: HTMLPreviewPage.java,v 1.1 2004-09-02 18:13:31 jsurfer Exp $
- */
-
-package net.sourceforge.phpeclipse.html.ui.internal.preview;
-
-import java.net.URL;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.LocationAdapter;
-import org.eclipse.swt.browser.LocationEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.part.Page;
-import org.eclipse.ui.texteditor.IUpdate;
-
-import net.sourceforge.phpeclipse.ui.views.preview.IBrowserPreviewPage;
-
-/**
- * Provides a HTML preview page based on the SWT browser control.
- */
-public class HTMLPreviewPage extends Page
- implements IBrowserPreviewPage, IUpdate {
-
- // Instance Variables ------------------------------------------------------
-
- /** The browser widget. */
- private Browser browser;
-
- /** The URL of the resource to preview. */
- private URL location;
-
- // Constructors ------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param location the URL of the resource to preview
- */
- public HTMLPreviewPage(URL location) {
- this.location = location;
- }
-
- // IPage Implementation ----------------------------------------------------
-
- /*
- * @see org.eclipse.ui.part.IPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- browser = new Browser(parent, SWT.NONE);
- browser.setLayout(new FillLayout());
- browser.setUrl(location.toString());
- browser.addLocationListener(new LocationAdapter() {
- public void changing(LocationEvent event) {
- if (event.location != null) {
- event.doit = false;
- }
- }
- });
- }
-
- /*
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- public Control getControl() {
- return browser;
- }
-
- /*
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- browser.setFocus();
- }
-
- // IUpdate Implementation --------------------------------------------------
-
- /*
- * @see IUpdate#update()
- */
- public void update() {
- browser.refresh();
- }
-
-}
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
<view
name="%classesViewName"
icon="icons/js.gif"
- category="net.sourceforge.phpeclipse.ui.views"
+ category="net.sourceforge.phpeclipse.views.category"
class="net.sourceforge.phpeclipse.js.ui.views.JSClassesView"
id="net.sourceforge.phpeclipse.js.ui.views.JSClassesView">
</view>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
<?eclipse version="3.0"?>
<plugin
id="net.sourceforge.phpdt.smarty.ui"
- name="Web Development Tools HTML UI"
- version="0.0.1"
- provider-name="WDTE Project"
- class="net.sourceforge.phpdt.smarty.ui.HTMLUI">
+ name="PHPeclipse Smarty UI"
+ version="1.1.0"
+ provider-name="PHPeclipse.de"
+ class="net.sourceforge.phpdt.smarty.ui.SmartyUI">
<runtime>
<library name="htmlui.jar">
name="HTML Editor"
icon="icons/full/obj16/html.png"
extensions="tpl"
- class="net.sourceforge.phpdt.smarty.ui.internal.editor.HTMLEditor"
+ contributorClass="net.sourceforge.phpdt.smarty.ui.internal.editor.SmartyEditorActionContributor"
+ class="net.sourceforge.phpdt.smarty.ui.internal.editor.SmartyEditor"
id="net.sourceforge.phpdt.smarty.ui.editor">
</editor>
</extension>
point="org.eclipse.core.filebuffers.documentSetup">
<participant
extensions="tpl"
- class="net.sourceforge.phpdt.smarty.ui.internal.editor.HTMLDocumentSetupParticipant">
+ class="net.sourceforge.phpdt.smarty.ui.internal.editor.SmartyDocumentSetupParticipant">
</participant>
</extension>
<extension
point="org.eclipse.ui.editors.documentProviders">
<provider
extensions="tpl"
- class="net.sourceforge.phpdt.smarty.ui.internal.editor.HTMLDocumentProvider"
+ class="net.sourceforge.phpdt.smarty.ui.internal.editor.SmartyDocumentProvider"
id="net.sourceforge.phpdt.smarty.ui.documentProvider">
</provider>
</extension>
* Contributors:
* Christopher Lenz - initial API and implementation
*
- * $Id: HTMLUI.java,v 1.1 2004-09-02 18:25:04 jsurfer Exp $
+ * $Id: SmartyUI.java,v 1.1 2004-09-03 17:31:18 jsurfer Exp $
*/
package net.sourceforge.phpdt.smarty.ui;
/**
* The main plugin class to be used in the desktop.
*/
-public class HTMLUI extends AbstractUIPlugin {
+public class SmartyUI extends AbstractUIPlugin {
// Class Variables ---------------------------------------------------------
/** The shared instance. */
- private static HTMLUI plugin;
+ private static SmartyUI plugin;
// Constructors ------------------------------------------------------------
/**
* The constructor.
*/
- public HTMLUI() {
+ public SmartyUI() {
plugin = this;
}
/**
* Returns the shared instance.
*/
- public static HTMLUI getDefault() {
+ public static SmartyUI getDefault() {
return plugin;
}
}
* Contributors:
* Christopher Lenz - initial API and implementation
*
- * $Id: HTMLUIMessages.java,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
+ * $Id: SmartyUIMessages.java,v 1.1 2004-09-03 17:31:19 jsurfer Exp $
*/
package net.sourceforge.phpdt.smarty.ui.internal;
/**
* Utility class that provides easy access to externalized strings.
*/
-public final class HTMLUIMessages {
+public final class SmartyUIMessages {
// Constants ---------------------------------------------------------------
* Qualified name of the resource bundle containing the localized messages.
*/
private static final String RESOURCE_BUNDLE =
- "net.sourceforge.phpdt.smarty.ui.internal.HTMLUIMessages"; //$NON-NLS-1$
+ "net.sourceforge.phpdt.smarty.ui.internal.SmartyUIMessages"; //$NON-NLS-1$
// Class Variables ---------------------------------------------------------
/**
* Hidden constructor.
*/
- private HTMLUIMessages() {
+ private SmartyUIMessages() {
// Hidden
}
# Contributors:
# Christopher Lenz - initial english resources
#
-# $Id: HTMLUIMessages.properties,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
+# $Id: SmartyUIMessages.properties,v 1.1 2004-09-03 17:31:19 jsurfer Exp $
#
* Contributors:
* Christopher Lenz - initial API and implementation
*
- * $Id: HTMLDocumentProvider.java,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
+ * $Id: SmartyDocumentProvider.java,v 1.1 2004-09-03 17:31:18 jsurfer Exp $
*/
package net.sourceforge.phpdt.smarty.ui.internal.editor;
/**
* Document provider for HTML files.
*/
-public class HTMLDocumentProvider extends XMLDocumentProvider {
+public class SmartyDocumentProvider extends XMLDocumentProvider {
}
* Contributors:
* Christopher Lenz - initial implementation
*
- * $Id: HTMLDocumentSetupParticipant.java,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
+ * $Id: SmartyDocumentSetupParticipant.java,v 1.1 2004-09-03 17:31:18 jsurfer Exp $
*/
package net.sourceforge.phpdt.smarty.ui.internal.editor;
/**
* Document setup participant that sets up the HTML specific partitioning.
*/
-public class HTMLDocumentSetupParticipant extends XMLDocumentSetupParticipant {
+public class SmartyDocumentSetupParticipant extends XMLDocumentSetupParticipant {
}
* Contributors:
* Christopher Lenz - initial implementation
*
- * $Id: HTMLEditor.java,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
+ * $Id: SmartyEditor.java,v 1.1 2004-09-03 17:31:18 jsurfer Exp $
*/
package net.sourceforge.phpdt.smarty.ui.internal.editor;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import net.sourceforge.phpdt.smarty.ui.internal.preview.HTMLPreviewPage;
-import net.sourceforge.phpdt.smarty.ui.internal.text.HTMLConfiguration;
-import net.sourceforge.phpeclipse.ui.views.preview.IBrowserPreviewPage;
+import net.sourceforge.phpdt.smarty.ui.internal.text.SmartyConfiguration;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import net.sourceforge.phpeclipse.xml.ui.XMLPlugin;
import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLDocumentProvider;
import net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor;
import net.sourceforge.phpeclipse.xml.ui.text.XMLTextTools;
-import org.eclipse.core.resources.IFile;
import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.ContentAssistAction;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
/**
* HTML editor implementation.
*/
-public class HTMLEditor extends XMLEditor {
+public class SmartyEditor extends XMLEditor {
+ public SmartyEditor() {
+ super(ShowExternalPreviewAction.SMARTY_TYPE);
+ }
// Instance Variables ------------------------------------------------------
/** The associated preview page. */
- private HTMLPreviewPage previewPage;
+// private HTMLPreviewPage previewPage;
// XMLEditor Implementation ------------------------------------------------
- /*
- * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorSaved()
- */
- protected void editorSaved() {
- if (previewPage != null) {
- previewPage.update();
- }
- }
/*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
- if (adapter == IBrowserPreviewPage.class) {
- if (previewPage == null) {
- previewPage = createPreviewPage();
- }
- return previewPage;
- }
+// if (adapter == IBrowserPreviewPage.class) {
+// if (previewPage == null) {
+// previewPage = createPreviewPage();
+// }
+// return previewPage;
+// }
return super.getAdapter(adapter);
}
/**
* Creates the HTML preview page.
*/
- private HTMLPreviewPage createPreviewPage() {
- IEditorInput input = getEditorInput();
- if (input instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) input).getFile();
- try {
- URL location = file.getLocation().toFile().toURL();
- return new HTMLPreviewPage(location);
- } catch (MalformedURLException e) { }
- }
- return null;
- }
+// private HTMLPreviewPage createPreviewPage() {
+// IEditorInput input = getEditorInput();
+// if (input instanceof IFileEditorInput) {
+// IFile file = ((IFileEditorInput) input).getFile();
+// try {
+// URL location = file.getLocation().toFile().toURL();
+// return new HTMLPreviewPage(location);
+// } catch (MalformedURLException e) { }
+// }
+// return null;
+// }
protected void createActions() {
super.createActions();
- IAction action = new ContentAssistAction(HTMLEditorMessages.getResourceBundle(),
+ IAction action = new ContentAssistAction(SmartyEditorMessages.getResourceBundle(),
"ContentAssistProposal.", this); //$NON-NLS-1$
action
.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
super.initializeEditor();
XMLTextTools xmlTextTools = XMLPlugin.getDefault().getXMLTextTools();
- setSourceViewerConfiguration(new HTMLConfiguration(xmlTextTools, this));
+ setSourceViewerConfiguration(new SmartyConfiguration(xmlTextTools, this));
setDocumentProvider(new XMLDocumentProvider());
}
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package net.sourceforge.phpdt.smarty.ui.internal.editor;
+
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Common base class for action contributors for Java editors.
+ */
+public class SmartyEditorActionContributor extends BasicTextEditorActionContributor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ ITextEditor textEditor = null;
+ if (part instanceof ITextEditor)
+ textEditor = (ITextEditor) part;
+
+ if (textEditor != null) {
+ IFile file = null;
+ IEditorInput editorInput = textEditor.getEditorInput();
+
+ if (editorInput instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) editorInput).getFile();
+ }
+
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ fShowExternalPreviewAction.setEditor(textEditor);
+ fShowExternalPreviewAction.update();
+ if (fShowExternalPreviewAction != null)
+ fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.SMARTY_TYPE);
+ }
+ }
+}
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-public class HTMLEditorMessages {
+public class SmartyEditorMessages {
- private static final String RESOURCE_BUNDLE= "net.sourceforge.phpdt.smarty.ui.internal.editor.HTMLEditorMessages";//$NON-NLS-1$
+ private static final String RESOURCE_BUNDLE= "net.sourceforge.phpdt.smarty.ui.internal.editor.SmartyEditorMessages";//$NON-NLS-1$
private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
- private HTMLEditorMessages() {
+ private SmartyEditorMessages() {
}
public static String getString(String key) {
+++ /dev/null
-/*
- * Copyright (c) 2004 Christopher Lenz and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Christopher Lenz - initial implementation
- *
- * $Id: HTMLPreviewPage.java,v 1.1 2004-09-02 18:25:05 jsurfer Exp $
- */
-
-package net.sourceforge.phpdt.smarty.ui.internal.preview;
-
-import java.net.URL;
-
-import net.sourceforge.phpeclipse.ui.views.preview.IBrowserPreviewPage;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.LocationAdapter;
-import org.eclipse.swt.browser.LocationEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.part.Page;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * Provides a HTML preview page based on the SWT browser control.
- */
-public class HTMLPreviewPage extends Page
- implements IBrowserPreviewPage, IUpdate {
-
- // Instance Variables ------------------------------------------------------
-
- /** The browser widget. */
- private Browser browser;
-
- /** The URL of the resource to preview. */
- private URL location;
-
- // Constructors ------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param location the URL of the resource to preview
- */
- public HTMLPreviewPage(URL location) {
- this.location = location;
- }
-
- // IPage Implementation ----------------------------------------------------
-
- /*
- * @see org.eclipse.ui.part.IPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- browser = new Browser(parent, SWT.NONE);
- browser.setLayout(new FillLayout());
- browser.setUrl(location.toString());
- browser.addLocationListener(new LocationAdapter() {
- public void changing(LocationEvent event) {
- if (event.location != null) {
- event.doit = false;
- }
- }
- });
- }
-
- /*
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- public Control getControl() {
- return browser;
- }
-
- /*
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- browser.setFocus();
- }
-
- // IUpdate Implementation --------------------------------------------------
-
- /*
- * @see IUpdate#update()
- */
- public void update() {
- browser.refresh();
- }
-
-}
/**
* A completion processor for XML templates.
*/
-public class HTMLCompletionProcessor extends BasicCompletionProcessor {
+public class SmartyCompletionProcessor extends BasicCompletionProcessor {
/**
* Return the XML context type that is supported by this plugin.
*
* TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
*/
-public class HTMLConfiguration extends XMLConfiguration {
+public class SmartyConfiguration extends XMLConfiguration {
private SmartyTagScanner smartyTagScanner;
- public HTMLConfiguration(XMLTextTools tools) {
+ public SmartyConfiguration(XMLTextTools tools) {
this(tools, null);
}
- public HTMLConfiguration(XMLTextTools tools, ITextEditor editor) {
+ public SmartyConfiguration(XMLTextTools tools, ITextEditor editor) {
super(tools, editor);
Map tokens = tools.getTokens();
smartyTagScanner = new SmartyTagScanner(tokens);
ContentAssistant assistant = new ContentAssistant();
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
- IContentAssistProcessor processor = new HTMLCompletionProcessor();
+ IContentAssistProcessor processor = new SmartyCompletionProcessor();
assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_PI);
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
# Contributors:
# Christopher Lenz - initial english resources
#
-# $Id: plugin.properties,v 1.1 2004-09-02 18:26:30 jsurfer Exp $
+# $Id: plugin.properties,v 1.2 2004-09-03 17:30:19 jsurfer Exp $
#
pluginName = Web Development Tools UI
providerName= WDTE Project
preferencePageName = PHPeclipse Web Development
-
viewCategoryName = PHPeclipse Web Development
-previewViewName = Browser Preview
+
templates.contextType.xml=xml
templates.contextType.html=html
+templates.contextType.smarty=smarty
templates.contextType.javascript=javascript
\ No newline at end of file
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="net.sourceforge.phpeclipse.webbrowser"/>
</requires>
class="net.sourceforge.phpeclipse.ui.templates.preferences.TemplatesPreferencePage"
id="net.sourceforge.phpeclipse.ui.templates.preferences.TemplatesPreferencePage">
</page>
+ <page
+ category="net.sourceforge.phpeclipse.ui.preferencePage"
+ name="Project Defaults"
+ class="net.sourceforge.phpeclipse.ui.preferences.PHPMiscProjectPreferences"
+ id="net.sourceforge.phpeclipse.ui.preferences.PHPMiscProjectPreferences">
+ </page>
+ <page
+ category="net.sourceforge.phpeclipse.ui.preferencePage"
+ name="Browser Preview Defaults"
+ class="net.sourceforge.phpeclipse.ui.preferences.PHPPreviewProjectPreferences"
+ id="net.sourceforge.phpeclipse.ui.preferences.PHPPreviewProjectPreferences">
+ </page>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.propertyPages">
+<!-- <page
+ objectClass="org.eclipse.core.resources.IProject"
+ name="%propertyPagePHPProject.name"
+ class="net.sourceforge.phpeclipse.preferences.PHPProjectPropertyPage"
+ id="net.sourceforge.phpeclipse.preferences.PHPProjectPropertyPage">
+ <filter
+ name="nature"
+ value="net.sourceforge.phpeclipse.phpnature">
+ </filter>
+ </page> -->
+ <page
+ objectClass="org.eclipse.core.resources.IProject"
+ name="PHP Project Settings"
+ class="net.sourceforge.phpeclipse.ui.preferences.PHPMiscProjectPreferences"
+ id="net.sourceforge.phpeclipse.ui.preferences.project.PHPMiscProjectPreferences">
+ <filter
+ name="nature"
+ value="net.sourceforge.phpeclipse.phpnature">
+ </filter>
+ </page>
+ <page
+ objectClass="org.eclipse.core.resources.IFile"
+ name="PHP Browser Preview"
+ class="net.sourceforge.phpeclipse.ui.preferences.PHPPreviewProjectPreferences"
+ id="net.sourceforge.phpeclipse.ui.preferences.PHPPreviewProjectPreferences">
+ </page>
+ </extension>
+ <!-- <extension
point="org.eclipse.ui.views">
<category
name="%viewCategoryName"
- id="net.sourceforge.phpeclipse.ui.views">
+ id="net.sourceforge.phpeclipse.views.category">
</category>
- <view
+ <view
name="%previewViewName"
icon="icons/full/cview16/preview.gif"
category="net.sourceforge.phpeclipse.ui.views"
fastViewWidthRatio="66"
class="net.sourceforge.phpeclipse.ui.views.preview.BrowserPreview"
id="net.sourceforge.phpeclipse.ui.views.browserPreview">
- </view>
- </extension>
+ </view>
+ </extension> -->
<extension
point="org.eclipse.ui.editors.templates">
class="net.sourceforge.phpeclipse.ui.templates.template.JSContextType"
id="javascript">
</contextType>
- <!-- <contextType
+ <contextType
+ name="%templates.contextType.smarty"
+ class="net.sourceforge.phpeclipse.ui.templates.template.SmartyContextType"
+ id="smarty">
+ </contextType>
+ <!-- <contextType
name="%templates.javadoc.contextType.name"
class="org.eclipse.jdt.internal.corext.template.java.JavaDocContextType"
id="javadoc">
--- /dev/null
+
+package net.sourceforge.phpeclipse.ui;
+
+
+public interface IPreferenceConstants {
+ public static final String PHP_BOOKMARK_DEFAULT = "_php_bookmark_default";
+ public static final String PHP_LOCALHOST_PREF = "_php_localhost";
+ public static final String PHP_DOCUMENTROOT_PREF = "_php_documentroot";
+
+ public static final String PHP_AUTO_PREVIEW_DEFAULT = "_auto_preview";
+ public static final String PHP_BRING_TO_TOP_PREVIEW_DEFAULT = "_bring_to_top_preview";
+ public static final String PHP_SHOW_HTML_FILES_LOCAL = "_show_html_files_local";
+}
--- /dev/null
+package net.sourceforge.phpeclipse.ui;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+public class PreferenceConstants {
+ /**
+ * A named preference that holds the characters that auto activate code assist in XML/HTML.
+ * <p>
+ * Value is of type <code>Sring</code>. All characters that trigger auto code assist in XML/HTML.
+ * </p>
+ */
+ public final static String CODEASSIST_AUTOACTIVATION_TRIGGERS_HTML = "content_assist_autoactivation_triggers_html"; //$NON-NLS-1$
+
+ /**
+ * A named preference that defines if code assist proposals are sorted in alphabetical order.
+ * <p>
+ * Value is of type <code>Boolean</code>. If <code>true</code> that are sorted in alphabetical
+ * order. If <code>false</code> that are unsorted.
+ * </p>
+ */
+ public final static String CODEASSIST_ORDER_PROPOSALS = "content_assist_order_proposals"; //$NON-NLS-1$
+
+ public static void initializeDefaultValues(IPreferenceStore store) {
+ store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_HTML, "<&#"); //$NON-NLS-1$
+ store.setDefault(PreferenceConstants.CODEASSIST_ORDER_PROPOSALS, false);
+
+ }
+}
\ No newline at end of file
* Contributors:
* Christopher Lenz - initial implementation
*
- * $Id: WebUI.java,v 1.1 2004-09-02 18:26:49 jsurfer Exp $
+ * $Id: WebUI.java,v 1.2 2004-09-03 17:30:32 jsurfer Exp $
*/
package net.sourceforge.phpeclipse.ui;
import net.sourceforge.phpeclipse.ui.templates.template.HTMLContextType;
import net.sourceforge.phpeclipse.ui.templates.template.JSContextType;
+import net.sourceforge.phpeclipse.ui.templates.template.SmartyContextType;
import net.sourceforge.phpeclipse.ui.templates.template.XMLContextType;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
import org.eclipse.jface.text.templates.persistence.TemplateStore;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* The web development tools UI plugin.
*/
-public class WebUI extends AbstractUIPlugin {
- private static final String CUSTOM_TEMPLATES_KEY= "net.sourceforge.phpeclipse.ui.templates"; //$NON-NLS-1$
-
- // Constants ---------------------------------------------------------------
-
- public static final String ICON_OVERLAY_ERROR =
- "full/ovr16/error_co.gif"; //$NON-NLS-1$
- public static final String ICON_OVERLAY_WARNING =
- "full/ovr16/warning_co.gif"; //$NON-NLS-1$
-
- // Instance Variables ------------------------------------------------------
-
- /** The shared instance. */
- private static WebUI plugin;
-
- /** The template store. */
- private TemplateStore fStore;
- /** The context type registry. */
- private ContributionContextTypeRegistry fRegistry;
- // Constructors ------------------------------------------------------------
-
- /**
- * The constructor.
- */
- public WebUI() {
- plugin = this;
- }
-
- // Public Methods ----------------------------------------------------------
-
- /**
- * Returns the shared instance.
- */
- public static WebUI getDefault() {
- return plugin;
- }
-
- // AbstractUIPlugin Implementation -----------------------------------------
-
- /*
- * @see AbstractUIPlugin#initializeImageRegistry(ImageRegistry)
- */
- protected void initializeImageRegistry(ImageRegistry reg) {
- reg.put(ICON_OVERLAY_ERROR, getImageDescriptor(ICON_OVERLAY_ERROR));
- reg.put(ICON_OVERLAY_WARNING, getImageDescriptor(ICON_OVERLAY_WARNING));
- }
-
- // Private Methods ---------------------------------------------------------
-
- /**
- * Returns an image descriptor for the image corresponding to the specified
- * key (which is the name of the image file).
- *
- * @param key The key of the image
- * @return The descriptor for the requested image, or <code>null</code> if
- * the image could not be found
- */
- private ImageDescriptor getImageDescriptor(String key) {
- try {
- URL url = getBundle().getEntry("/icons/" + key); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- } catch (IllegalStateException e) {
- return null;
- }
- }
-
- /**
- * Returns this plug-in's template store.
- *
- * @return the template store of this plug-in instance
- */
- public TemplateStore getTemplateStore() {
- if (fStore == null) {
- fStore= new ContributionTemplateStore(getContextTypeRegistry(), getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
- try {
- fStore.load();
- } catch (IOException e) {
- WebUI.getDefault().getLog().log(new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "", e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return fStore;
- }
-
- /**
- * Returns this plug-in's context type registry.
- *
- * @return the context type registry for this plug-in instance
- */
- public ContextTypeRegistry getContextTypeRegistry() {
- if (fRegistry == null) {
- // create an configure the contexts available in the editor
- fRegistry= new ContributionContextTypeRegistry();
- fRegistry.addContextType(XMLContextType.XML_CONTEXT_TYPE);
- fRegistry.addContextType(HTMLContextType.HTML_CONTEXT_TYPE);
- fRegistry.addContextType(JSContextType.JS_CONTEXT_TYPE);
- }
- return fRegistry;
- }
-}
+public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
+ private static final String CUSTOM_TEMPLATES_KEY = "net.sourceforge.phpeclipse.ui.templates"; //$NON-NLS-1$
+
+ // Constants ---------------------------------------------------------------
+
+ public static final String ICON_OVERLAY_ERROR = "full/ovr16/error_co.gif"; //$NON-NLS-1$
+
+ public static final String ICON_OVERLAY_WARNING = "full/ovr16/warning_co.gif"; //$NON-NLS-1$
+
+ // Instance Variables ------------------------------------------------------
+
+ /** The shared instance. */
+ private static WebUI plugin;
+ public static IWorkbenchPage getActivePage() {
+ return getDefault().internalGetActivePage();
+ }
+
+ public static Shell getActiveWorkbenchShell() {
+ return getActiveWorkbenchWindow().getShell();
+ }
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ // Public Methods ----------------------------------------------------------
+
+ /**
+ * Returns the shared instance.
+ */
+ public static WebUI getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /** The context type registry. */
+ private ContributionContextTypeRegistry fRegistry;
+
+ /** The template store. */
+ private TemplateStore fStore;
+
+ // Constructors ------------------------------------------------------------
+
+ /**
+ * The constructor.
+ */
+ public WebUI() {
+ plugin = this;
+ }
+
+ /**
+ * Returns this plug-in's context type registry.
+ *
+ * @return the context type registry for this plug-in instance
+ */
+ public ContextTypeRegistry getContextTypeRegistry() {
+ if (fRegistry == null) {
+ // create an configure the contexts available in the editor
+ fRegistry = new ContributionContextTypeRegistry();
+ fRegistry.addContextType(XMLContextType.XML_CONTEXT_TYPE);
+ fRegistry.addContextType(HTMLContextType.HTML_CONTEXT_TYPE);
+ fRegistry.addContextType(SmartyContextType.SMARTY_CONTEXT_TYPE);
+ fRegistry.addContextType(JSContextType.JS_CONTEXT_TYPE);
+ }
+ return fRegistry;
+ }
+
+ // Private Methods ---------------------------------------------------------
+
+ /**
+ * Returns an image descriptor for the image corresponding to the specified key (which is the name of the image file).
+ *
+ * @param key
+ * The key of the image
+ * @return The descriptor for the requested image, or <code>null</code> if the image could not be found
+ */
+ private ImageDescriptor getImageDescriptor(String key) {
+ try {
+ URL url = getBundle().getEntry("/icons/" + key); //$NON-NLS-1$
+ return ImageDescriptor.createFromURL(url);
+ } catch (IllegalStateException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns this plug-in's template store.
+ *
+ * @return the template store of this plug-in instance
+ */
+ public TemplateStore getTemplateStore() {
+ if (fStore == null) {
+ fStore = new ContributionTemplateStore(getContextTypeRegistry(), getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
+ try {
+ fStore.load();
+ } catch (IOException e) {
+ WebUI.getDefault().getLog().log(new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "", e)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ return fStore;
+ }
+
+ protected void initializeDefaultPreferences(IPreferenceStore store) {
+ store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
+ store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot().getLocation().toString());
+ store.setDefault(PHP_BOOKMARK_DEFAULT, "");
+
+ store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "true");
+ store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "true");
+ store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
+ }
+ /*
+ * @see AbstractUIPlugin#initializeImageRegistry(ImageRegistry)
+ */
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ reg.put(ICON_OVERLAY_ERROR, getImageDescriptor(ICON_OVERLAY_ERROR));
+ reg.put(ICON_OVERLAY_WARNING, getImageDescriptor(ICON_OVERLAY_WARNING));
+ }
+ private IWorkbenchPage internalGetActivePage() {
+ IWorkbenchWindow window = getWorkbench().getActiveWorkbenchWindow();
+ if (window != null)
+ return window.getActivePage();
+ return null;
+ }
+}
\ No newline at end of file
* Contributors:
* Igor Malinin - initial contribution
*
- * $Id: EditorMessages.java,v 1.1 2004-09-02 18:26:30 jsurfer Exp $
+ * $Id: EditorMessages.java,v 1.2 2004-09-03 17:30:33 jsurfer Exp $
*/
package net.sourceforge.phpeclipse.ui.editor;
return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
+ /**
+ * @return Returns the bundle.
+ */
+ public static ResourceBundle getResourceBundle() {
+ return bundle;
+ }
}
-package net.sourceforge.phpeclipse.phpeditor;
+package net.sourceforge.phpeclipse.ui.editor;
+
/*******************************************************************************
* Copyright (c) 2000, 2002 IBM Corp. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* Contributors: IBM Corporation - Initial implementation Klaus Hartlage -
* www.eclipseproject.de
******************************************************************************/
-import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.actions.PHPEclipseShowAction;
-import net.sourceforge.phpeclipse.overlaypages.Util;
-import net.sourceforge.phpeclipse.views.browser.BrowserView;
+import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
+import net.sourceforge.phpeclipse.ui.WebUI;
+import net.sourceforge.phpeclipse.ui.overlaypages.Util;
+import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.TextEditorAction;
-//import org.eclipse.update.internal.ui.UpdatePerspective;
-//import org.eclipse.update.internal.ui.views.IEmbeddedWebBrowser;
+
/**
* ClassDeclaration that defines the action for parsing the current PHP file
*/
public class ShowExternalPreviewAction extends TextEditorAction {
+ public final static int XML_TYPE = 1;
+ public final static int HTML_TYPE = 2;
+ public final static int SMARTY_TYPE = 3;
+ public final static int PHP_TYPE = 4;
+
private static ShowExternalPreviewAction instance = new ShowExternalPreviewAction();
+
/**
* Constructs and updates the action.
*/
private ShowExternalPreviewAction() {
- super(PHPEditorMessages.getResourceBundle(), "ParserAction.", null); //$NON-NLS-1$
+ super(EditorMessages.getResourceBundle(), "ParserAction.", null); //$NON-NLS-1$
update();
}
-
-public static ShowExternalPreviewAction getInstance() {
+
+ public static ShowExternalPreviewAction getInstance() {
return instance;
}
+
/**
* Code called when the action is fired.
*/
public void run() {
+ doRun(PHP_TYPE);
+ }
+
+ public void doRun(int type) {
IFile previewFile = getFile();
if (previewFile == null) {
// should never happen
return;
}
- boolean autoPreview = Util.getPreviewBooleanValue(previewFile,
- IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT);
- boolean bringToTopPreview = Util.getPreviewBooleanValue(previewFile,
- IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT);
- boolean showHTMLFilesLocal = Util.getPreviewBooleanValue(previewFile,
- IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL);
- boolean isPHPFileName = PHPFileUtil.isPHPFileName(previewFile.getLocation().toString());
-
- if (autoPreview) {
+ String extension = previewFile.getFileExtension().toLowerCase();
+ boolean autoPreview = Util.getPreviewBooleanValue(previewFile, IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT);
+ boolean bringToTopPreview = Util.getPreviewBooleanValue(previewFile, IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT);
+ boolean showHTMLFilesLocal = Util.getPreviewBooleanValue(previewFile, IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL);
+ boolean isHTMLFileName = "xml".equals(extension)
+ || "html".equals(extension)
+ || "htm".equals(extension)
+ || "xhtml".equals(extension);
+ if (autoPreview) {
String localhostURL;
- if (showHTMLFilesLocal && (!isPHPFileName)) {
+ if (showHTMLFilesLocal && isHTMLFileName) {
localhostURL = previewFile.getLocation().toString();
- } else if ((localhostURL = PHPEclipseShowAction.getLocalhostURL(null,
- previewFile)) == null) {
+ } else if ((localhostURL = getLocalhostURL(null, previewFile)) == null) {
return;
}
- IWorkbenchPage page = PHPeclipsePlugin.getActivePage();
+ IWorkbenchPage page = WebUI.getActivePage();
try {
IViewPart part = page.findView(BrowserView.ID_BROWSER);
if (part == null) {
}
}
((BrowserView) part).setUrl(localhostURL);
-
+
} catch (Exception e) {
//PHPeclipsePlugin.log(e);
}
}
}
-
- public void refresh() {
+
+ public void refresh(int type) {
IFile fileToParse = getFile();
if (fileToParse == null) {
// should never happen
return;
}
- boolean autoPreview = Util.getPreviewBooleanValue(fileToParse,
- IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT);
- boolean bringToTopPreview = Util.getPreviewBooleanValue(fileToParse,
- IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT);
+ boolean autoPreview = Util.getPreviewBooleanValue(fileToParse, IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT);
+ boolean bringToTopPreview = Util.getPreviewBooleanValue(fileToParse, IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT);
+
if (autoPreview) {
- IWorkbenchPage page = PHPeclipsePlugin.getActivePage();
+ IWorkbenchPage page = WebUI.getActivePage();
try {
IViewPart part = page.findView(BrowserView.ID_BROWSER);
if (part == null) {
}
}
((BrowserView) part).refresh();
-
+
} catch (Exception e) {
- // PHPeclipsePlugin.log(e);
+ // PHPeclipsePlugin.log(e);
}
}
}
+
/**
* Finds the file that's currently opened in the PHP Text Editor
*/
// if nothing was found, which should never happen
return null;
}
+
+ public static String getLocalhostURL(IPreferenceStore store, IFile file) {
+ if (store == null) {
+ store = WebUI.getDefault().getPreferenceStore();
+ }
+ // IPath path = file.getFullPath();
+ String localhostURL = file.getLocation().toString();
+ String lowerCaseFileName = localhostURL.toLowerCase();
+ // String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
+ String documentRoot = Util.getMiscProjectsPreferenceValue(file.getProject(), IPreferenceConstants.PHP_DOCUMENTROOT_PREF);
+
+ documentRoot = documentRoot.replace('\\', '/');
+ documentRoot = documentRoot.toLowerCase();
+
+ if (lowerCaseFileName.startsWith(documentRoot)) {
+ localhostURL = localhostURL.substring(documentRoot.length());
+ } else {
+ return null;
+ }
+ // return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL;
+ return Util.getMiscProjectsPreferenceValue(file.getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF) + localhostURL;
+ }
}
\ No newline at end of file
* Contributors:
* Berthold Daum
*******************************************************************************/
-package net.sourceforge.phpeclipse.overlaypages;
+package net.sourceforge.phpeclipse.ui.overlaypages;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
* Berthold Daum
*******************************************************************************/
-package net.sourceforge.phpeclipse.overlaypages;
+package net.sourceforge.phpeclipse.ui.overlaypages;
import java.util.ResourceBundle;
public class Messages {
- private final static String RESOURCE_BUNDLE= "net.sourceforge.phpeclipse.overlayPages.Messages";//$NON-NLS-1$
+ private final static String RESOURCE_BUNDLE= "net.sourceforge.phpeclipse.ui.overlaypages.Messages";//$NON-NLS-1$
private static ResourceBundle fgResourceBundle = null;
* Contributors:
* Berthold Daum
*******************************************************************************/
-package net.sourceforge.phpeclipse.overlaypages;
+package net.sourceforge.phpeclipse.ui.overlaypages;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
* Berthold Daum
*******************************************************************************/
-package net.sourceforge.phpeclipse.overlaypages;
+package net.sourceforge.phpeclipse.ui.overlaypages;
import java.io.IOException;
import java.io.OutputStream;
-package net.sourceforge.phpeclipse.overlaypages;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences;
-import net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences;
+package net.sourceforge.phpeclipse.ui.overlaypages;
+
+import net.sourceforge.phpeclipse.ui.WebUI;
+import net.sourceforge.phpeclipse.ui.preferences.PHPMiscProjectPreferences;
+import net.sourceforge.phpeclipse.ui.preferences.PHPPreviewProjectPreferences;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
public class Util {
public static String getMiscProjectsPreferenceValue(IResource resource, String key) {
- return getOverlayedPrefProjectValue(resource,
- PHPMiscProjectPreferences.PREF_ID, key);
+ return getOverlayedPrefProjectValue(resource, PHPMiscProjectPreferences.PREF_ID, key);
}
- public static String getOverlayedPrefProjectValue(IResource resource,
- String pageId, String key) {
+
+ public static String getOverlayedPrefProjectValue(IResource resource, String pageId, String key) {
IProject project = resource.getProject();
String value = null;
if (useProjectSettings(project, pageId)) {
}
if (value != null)
return value;
- return PHPeclipsePlugin.getDefault().getPreferenceStore().getString(key);
+ return WebUI.getDefault().getPreferenceStore().getString(key);
}
- public static String getOverlayedPrefResourceValue(IResource resource,
- String pageId, String key) {
+
+ public static String getOverlayedPrefResourceValue(IResource resource, String pageId, String key) {
String value = null;
if (useProjectSettings(resource, pageId)) {
value = getProperty(resource, pageId, key);
}
if (value != null)
return value;
- return PHPeclipsePlugin.getDefault().getPreferenceStore().getString(key);
+ return WebUI.getDefault().getPreferenceStore().getString(key);
}
+
public static boolean getPreviewBooleanValue(IResource resource, String key) {
- return getOverlayedPrefResourceValue(resource,
- PHPPreviewProjectPreferences.PREF_ID, key).equals("true");
+ return getOverlayedPrefResourceValue(resource, PHPPreviewProjectPreferences.PREF_ID, key).equals("true");
}
+
public static String getPreviewStringValue(IResource resource, String key) {
- return getOverlayedPrefResourceValue(resource,
- PHPPreviewProjectPreferences.PREF_ID, key);
+ return getOverlayedPrefResourceValue(resource, PHPPreviewProjectPreferences.PREF_ID, key);
}
- private static String getProperty(IResource resource, String pageId,
- String key) {
+
+ private static String getProperty(IResource resource, String pageId, String key) {
try {
return resource.getPersistentProperty(new QualifiedName(pageId, key));
} catch (CoreException e) {
}
return null;
}
+
private static boolean useProjectSettings(IResource resource, String pageId) {
- String use = getProperty(resource, pageId,
- FieldEditorOverlayPage.USEPROJECTSETTINGS);
+ String use = getProperty(resource, pageId, FieldEditorOverlayPage.USEPROJECTSETTINGS);
return "true".equals(use);
}
-}
+}
\ No newline at end of file
--- /dev/null
+package net.sourceforge.phpeclipse.ui.preferences;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+/**
+ * constnats for project preferences
+ */
+public interface IMiscProjectPreferences {
+
+ /**
+ * namespace URI for the properties
+ */
+// public static final String PROPERTY_NAMESPACE = "http://phpeclipse.org";
+
+ // public static final String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
+// /**
+// * property local name for the publish directory
+// */
+// public static final String PUBLISH_PROPERTY = "publish";
+//
+// /**
+// * property qualified name for the publish directory
+// */
+// public static final QualifiedName PUBLISH_PROPERTY_NAME =
+// new QualifiedName(PROPERTY_NAMESPACE,PUBLISH_PROPERTY);
+//
+// /**
+// * default value for the publish directory name
+// */
+// public static final String DEFAULT_PUBLISH_DIR = "c:\\temp";
+
+
+}
\ No newline at end of file
-package net.sourceforge.phpeclipse.preferences;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+package net.sourceforge.phpeclipse.ui.preferences;
+import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
+import net.sourceforge.phpeclipse.ui.WebUI;
+import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-
-import net.sourceforge.phpeclipse.overlaypages.FieldEditorOverlayPage;
/**
*
* This page will be added to the project's property page dialog when the
* @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
*/
protected IPreferenceStore doGetPreferenceStore() {
- return PHPeclipsePlugin.getDefault().getPreferenceStore();
+ return WebUI.getDefault().getPreferenceStore();
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
--- /dev/null
+package net.sourceforge.phpeclipse.ui.preferences;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class PHPPreferencesMessages {
+
+ private static final String RESOURCE_BUNDLE= PHPPreferencesMessages.class.getName();
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private PHPPreferencesMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+
+ /**
+ * Gets a string from the resource bundle and formats it with arguments
+ */
+ public static String getFormattedString(String key, Object[] args) {
+ return MessageFormat.format(getString(key), args);
+ }
+}
--- /dev/null
+#########################################
+# PHPProjectLibraryPage
+#########################################
+
+PHPProjectLibraryPage.elementNotIProject=ERROR: Element not IProject
+PHPProjectLibraryPage.project=Project
+PHPProjectLibraryPage.tabName=Projects
+
+
+#########################################
+# Property Pages
+#########################################
+
+PHPProjectPropertyPage.phpProjectClosed=The project selected is a PHP project, but is closed.
+PHPProjectPropertyPage.performOkExceptionDialogTitle=Unable to save
+PHPProjectPropertyPage.performOkExceptionDialogMessage=ERROR: Unable to save project properties.
+
+PHPMiscProjectPreferences.localhost=Localhost
+PHPMiscProjectPreferences.documentroot=DocumentRoot
+PHPMiscProjectPreferences.bookmark=SQL default bookmark:
+
+PHPMiscProjectPreferences.obfuscator=Obfuscator directory:
+
+PHPPreviewProjectPreferences.auto_preview=Refresh PHP browser view when opening editor
+PHPPreviewProjectPreferences.bring_to_top_preview=Show PHP browser view when opening editor
+PHPPreviewProjectPreferences.show_html_files_local=Show HTML files as local resources (no 'http://' url)
+
+#########################################
+# Preference Pages
+#########################################
+PHPBasePreferencePage.description=PHP Preferences
+PHPBasePreferencePage.websettingsGroup=Webserver Settings
+PHPBasePreferencePage.websettingsGroup.localhost=Localhost
+PHPBasePreferencePage.websettingsGroup.docroot=DocumentRoot
+PHPBasePreferencePage.websettingsGroup.browser=External browser command
+PHPBasePreferencePage.websettingsGroup.useexternal=Use external browser
+#PHPBasePreferencePage.websettingsGroup.showexternalpreview=Show preview on editor load (win32 only)
+PHPBasePreferencePage.apacheGroup=Apache Settings
+PHPBasePreferencePage.apacheGroup.run=Apache
+PHPBasePreferencePage.apacheGroup.start=Start Apache
+PHPBasePreferencePage.apacheGroup.start_background=Run in background mode
+PHPBasePreferencePage.apacheGroup.stop=Stop Apache
+PHPBasePreferencePage.apacheGroup.stop_background=Run in background mode
+PHPBasePreferencePage.apacheGroup.restart=Restart Apache
+PHPBasePreferencePage.apacheGroup.restart_background=Run in background mode
+PHPBasePreferencePage.console.php=Run PHP command
+PHPBasePreferencePage.mySQLGroup=MySQL Settings
+PHPBasePreferencePage.mySQLGroup.run=MySQL
+PHPBasePreferencePage.mySQLGroup.start_background=Run in background mode
+PHPBasePreferencePage.mySQLGroup.command=Start MySQL
+PHPBasePreferencePage.parsers=Parsing settings
+PHPBasePreferencePage.parsers.pos=Parse on save
+PHPBasePreferencePage.parsers.external=External
+PHPBasePreferencePage.parsers.internal=Internal
+PHPBasePreferencePage.parsers.extcommand=Parser command
+PHPBasePreferencePage.parsers.choose=Choose PHP Parser
+
+PHPEditorSyntaxPreferencePage.description:PHP Editor Preferences
+PHPEditorSyntaxPreferencePage.background:Background settings
+PHPEditorSyntaxPreferencePage.foreground:Foreground settings
+PHPEditorSyntaxPreferencePage.syntax:Syntax highlighting
+PHPEditorSyntaxPreferencePage.color:Colour
+PHPEditorSyntaxPreferencePage.bold:Bold
+PHPEditorSyntaxPreferencePage.italic:Italic
+PHPEditorSyntaxPreferencePage.underline:Underline
+PHPEditorSyntaxPreferencePage.multiLineComment=Multi-line comment
+PHPEditorSyntaxPreferencePage.singleLineComment=Single-line comment
+PHPEditorSyntaxPreferencePage.tags=PHP Tags
+PHPEditorSyntaxPreferencePage.keywords=Keywords
+PHPEditorSyntaxPreferencePage.variables=Variables
+PHPEditorSyntaxPreferencePage.types=Types
+PHPEditorSyntaxPreferencePage.functions=Functions
+PHPEditorSyntaxPreferencePage.constants=Constants
+PHPEditorSyntaxPreferencePage.strings=Strings
+PHPEditorSyntaxPreferencePage.others=Others
+PHPEditorSyntaxPreferencePage.syntaxdialog=Custom PHP Syntax File:
+PHPEditorSyntaxPreferencePage.browse=Browse..
+PHPEditorSyntaxPreferencePage.textfont=Text font
+
+PHPLanguagePreferencePage.description=PHP Editor Language
+PHPLanguagePreferencePage.preflingo=PHP Language Preference
+PHPLanguagePreferencePage.choose=Choose Language
+PHPLanguagePreferencePage.english=English
+PHPLanguagePreferencePage.german=German
+PHPLanguagePreferencePage.french=French
+PHPLanguagePreferencePage.spanish=Spanish
+PHPLanguagePreferencePage.japanese=Japanese
\ No newline at end of file
-package net.sourceforge.phpeclipse.preferences;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+package net.sourceforge.phpeclipse.ui.preferences;
+import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
+import net.sourceforge.phpeclipse.ui.WebUI;
+import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-
-import net.sourceforge.phpeclipse.overlaypages.FieldEditorOverlayPage;
/**
*
* This page will be added to the project's property page dialog when the
* @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
*/
protected IPreferenceStore doGetPreferenceStore() {
- return PHPeclipsePlugin.getDefault().getPreferenceStore();
+ return WebUI.getDefault().getPreferenceStore();
}
/*
* (non-Javadoc)
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.templates.Template;
import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
import org.eclipse.jface.text.templates.TemplateContext;
*/
public class BasicCompletionProcessor extends TemplateCompletionProcessor {
private static final String DEFAULT_IMAGE = "icons/template.gif"; //$NON-NLS-1$
-
+ private char[] fProposalAutoActivationSet;
+// private PHPCompletionProposalComparator fComparator;
+ public BasicCompletionProcessor() {
+ super();
+// fComparator = new PHPCompletionProposalComparator();
+ }
/**
* We watch for angular brackets since those are often part of XML templates.
*/
return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
}
+ /**
+ * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return fProposalAutoActivationSet;
+ }
+
+ /**
+ * Sets this processor's set of characters triggering the activation of the
+ * completion proposal computation.
+ *
+ * @param activationSet the activation set
+ */
+ public void setCompletionProposalAutoActivationCharacters(char[] activationSet) {
+ fProposalAutoActivationSet= activationSet;
+ }
+
+ /**
+ * Order the given proposals.
+ */
+// private ICompletionProposal[] order(ICompletionProposal[] proposals) {
+// Arrays.sort(proposals, fComparator);
+// return proposals;
+// }
+
+ /**
+ * Tells this processor to order the proposals alphabetically.
+ *
+ * @param order <code>true</code> if proposals should be ordered.
+ */
+// public void orderProposalsAlphabetically(boolean order) {
+// fComparator.setOrderAlphabetically(order);
+// }
}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package net.sourceforge.phpeclipse.ui.templates.template;
+
+import org.eclipse.jface.text.templates.GlobalTemplateVariables;
+import org.eclipse.jface.text.templates.TemplateContextType;
+
+
+/**
+ * A very simple context type.
+ */
+public class SmartyContextType extends TemplateContextType {
+
+ /** This context's id */
+ public static final String SMARTY_CONTEXT_TYPE= "smarty"; //$NON-NLS-1$
+
+ /**
+ * Creates a new XML context type.
+ */
+ public SmartyContextType() {
+ addGlobalResolvers();
+ }
+
+ private void addGlobalResolvers() {
+ addResolver(new GlobalTemplateVariables.Cursor());
+ addResolver(new GlobalTemplateVariables.WordSelection());
+ addResolver(new GlobalTemplateVariables.LineSelection());
+ addResolver(new GlobalTemplateVariables.Dollar());
+ addResolver(new GlobalTemplateVariables.Date());
+ addResolver(new GlobalTemplateVariables.Year());
+ addResolver(new GlobalTemplateVariables.Time());
+ addResolver(new GlobalTemplateVariables.User());
+ }
+
+}
+++ /dev/null
-/*
- * Copyright (c) 2004 Christopher Lenz and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Christopher Lenz - initial API and implementation
- *
- * $Id: BrowserPreview.java,v 1.1 2004-09-02 18:26:31 jsurfer Exp $
- */
-
-package net.sourceforge.phpeclipse.ui.views.preview;
-
-import net.sourceforge.phpeclipse.ui.internal.WebUIMessages;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.MessagePage;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.PageBookView;
-
-/**
- *
- */
-public class BrowserPreview extends PageBookView {
-
- /*
- * @see PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
- */
- protected IPage createDefaultPage(PageBook book) {
- MessagePage page = new MessagePage();
- page.createControl(book);
- page.setMessage(WebUIMessages.getString(
- "BrowserPreview.notAvailable")); //$NON-NLS-1$);
- return page;
- }
-
- /*
- * @see PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
- */
- protected PageRec doCreatePage(IWorkbenchPart part) {
- // Try to get an outline page.
- Object adapter = part.getAdapter(IBrowserPreviewPage.class);
- if (adapter instanceof IBrowserPreviewPage) {
- IBrowserPreviewPage page = (IBrowserPreviewPage) adapter;
- if (page instanceof IPageBookViewPage) {
- initPage((IPageBookViewPage) page);
- }
- page.createControl(getPageBook());
- return new PageRec(part, page);
- }
- // There is no preview
- return null;
- }
-
- /*
- * @see PageBookView#doDestroyPage(IWorkbenchPart, PageBookView.PageRec)
- */
- protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- IBrowserPreviewPage page = (IBrowserPreviewPage) pageRecord.page;
- page.dispose();
- pageRecord.dispose();
- }
-
- /*
- * @see PageBookView#getBootstrapPart()
- */
- protected IWorkbenchPart getBootstrapPart() {
- IWorkbenchPage page = getSite().getPage();
- if (page != null) {
- return page.getActiveEditor();
- }
- return null;
- }
-
- /*
- * @see PageBookView#isImportant(IWorkbenchPart)
- */
- protected boolean isImportant(IWorkbenchPart part) {
- return (part instanceof IEditorPart);
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2004 Christopher Lenz and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Christopher Lenz - initial implementation
- *
- * $Id: IBrowserPreviewPage.java,v 1.1 2004-09-02 18:26:31 jsurfer Exp $
- */
-
-package net.sourceforge.phpeclipse.ui.views.preview;
-
-import org.eclipse.ui.part.IPage;
-
-/**
- *
- */
-public interface IBrowserPreviewPage extends IPage {
-
-}
-pluginName=Web Browser
-providerName=IBM
+phpBrowserView=PHP Browser
+viewCategoryName = PHPeclipse Web Development
+
+pluginName=PHPeclipse Browser
+providerName=PHPeclipse
extensionPointURLMap=URL Map
-%extensionPointFavorites=Favorite URLs
+extensionPointFavorites=Favorite URLs
# --- Internal Web Browser ---
-internalWebBrowserName=Internal Web Browser
-viewWebBrowserTitle=Web Browser
+internalWebBrowserName=PHP Web Browser
+viewWebBrowserTitle=PHP Web Browser
# Actions
actionWebBrowserGo=Go to the selected URL
<factory id="net.sourceforge.phpeclipse.webbrowser.elementFactory"
class="net.sourceforge.phpeclipse.webbrowser.WebBrowserEditorInput"/>
</extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="%viewCategoryName"
+ id="net.sourceforge.phpeclipse.views.category">
+ </category>
+ <view
+ name="%phpBrowserView"
+ icon="icons/obj16/internal_browser.gif"
+ category="net.sourceforge.phpeclipse.views.category"
+ class="net.sourceforge.phpeclipse.webbrowser.views.BrowserView"
+ id="net.sourceforge.phpeclipse.webbrowser.views">
+ </view>
+ </extension>
</plugin>
\ No newline at end of file
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package net.sourceforge.phpeclipse.views.browser;
+package net.sourceforge.phpeclipse.webbrowser.views;
import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser;
import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUIPlugin;
import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil;
* @see ViewPart
*/
public class BrowserView extends ViewPart {
- public final static String ID_BROWSER = "net.sourceforge.phpeclipse.views.browser";
+ public final static String ID_BROWSER = "net.sourceforge.phpeclipse.webbrowser.views";
WebBrowser instance = null;
/**
* Create the example
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<TITLE>Common Public License - v 1.0</TITLE>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" VLINK="#800000">
+
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b) its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7. GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
\ No newline at end of file
name="%dtdEditorName"
icon="icons/basic/obj16/xml.png"
extensions="dtd"
- contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ contributorClass="net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditorActionContributor"
class="net.sourceforge.phpeclipse.xml.ui.internal.editor.DTDEditor"
id="net.sourceforge.phpeclipse.xml.ui.internal.editor.DTDEditor">
</editor>
name="%xmlEditorName"
icon="icons/basic/obj16/xml.png"
extensions="xml,xsd"
- contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ contributorClass="net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditorActionContributor"
class="net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor"
id="net.sourceforge.phpeclipse.xml.ui.internal.editor.XMLEditor">
</editor>
* Igor Malinin - initial contribution
* Christopher Lenz - integrated outline page
*
- * $Id: XMLEditor.java,v 1.1 2004-09-02 18:28:04 jsurfer Exp $
+ * $Id: XMLEditor.java,v 1.2 2004-09-03 17:29:08 jsurfer Exp $
*/
package net.sourceforge.phpeclipse.xml.ui.internal.editor;
import java.util.List;
import net.sourceforge.phpeclipse.core.model.ISourceReference;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import net.sourceforge.phpeclipse.ui.text.IReconcilingParticipant;
import net.sourceforge.phpeclipse.xml.ui.XMLPlugin;
import net.sourceforge.phpeclipse.xml.ui.internal.outline.XMLOutlinePage;
import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLConfiguration;
import net.sourceforge.phpeclipse.xml.ui.text.XMLTextTools;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IRegion;
* @author Igor Malinin
*/
public class XMLEditor extends TextEditor implements IReconcilingParticipant {
-
- /**
- * Listens to changes to the selection in the outline page, and changes the
- * selection and highlight range in the editor accordingly.
+
+
+ /**
+ * Listens to changes to the selection in the outline page, and changes the selection and highlight range in the editor
+ * accordingly.
+ */
+ private class OutlineSelectionChangedListener implements ISelectionChangedListener {
+
+ /*
+ * @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
*/
- private class OutlineSelectionChangedListener
- implements ISelectionChangedListener {
-
- /*
- * @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection =
- (IStructuredSelection) event.getSelection();
- if (selection.isEmpty()) {
- resetHighlightRange();
- } else {
- ISourceReference element = (ISourceReference)
- selection.getFirstElement();
- highlightElement(element, true);
- }
- }
-
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if (selection.isEmpty()) {
+ resetHighlightRange();
+ } else {
+ ISourceReference element = (ISourceReference) selection.getFirstElement();
+ highlightElement(element, true);
+ }
}
- /**
- * The associated outline page.
- */
- XMLOutlinePage outlinePage;
-
- /**
- * Listens to changes in the outline page's selection to update the editor
- * selection and highlight range.
- */
- private ISelectionChangedListener outlineSelectionChangedListener;
+ }
+
+ /**
+ * The associated outline page.
+ */
+ XMLOutlinePage outlinePage;
+ int fType;
+ /**
+ * Listens to changes in the outline page's selection to update the editor selection and highlight range.
+ */
+ private ISelectionChangedListener outlineSelectionChangedListener;
+
+ public XMLEditor() {
+ this(ShowExternalPreviewAction.XML_TYPE);
+ }
+ /**
+ * Constructor.
+ */
+ public XMLEditor(int type) {
+ fType = type;
+ List stores = new ArrayList(3);
+
+ stores.add(XMLPlugin.getDefault().getPreferenceStore());
+ stores.add(EditorsUI.getPreferenceStore());
+
+ setPreferenceStore(new ChainedPreferenceStore((IPreferenceStore[]) stores.toArray(new IPreferenceStore[stores.size()])));
+ }
+
+ /*
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter(Class adapter) {
+ if (adapter.equals(IContentOutlinePage.class)) {
+ if (outlinePage == null) {
+ outlinePage = new XMLOutlinePage(this);
+ outlineSelectionChangedListener = new OutlineSelectionChangedListener();
+ outlinePage.addSelectionChangedListener(outlineSelectionChangedListener);
+ }
+
+ return outlinePage;
+ }
- /**
- * Constructor.
- */
- public XMLEditor() {
- List stores = new ArrayList(3);
-
- stores.add(XMLPlugin.getDefault().getPreferenceStore());
- stores.add(EditorsUI.getPreferenceStore());
-
- setPreferenceStore(
- new ChainedPreferenceStore(
- (IPreferenceStore[]) stores
- .toArray(new IPreferenceStore[stores.size()])));
- }
-
- /*
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter.equals(IContentOutlinePage.class)) {
- if (outlinePage == null) {
- outlinePage = new XMLOutlinePage(this);
- outlineSelectionChangedListener =
- new OutlineSelectionChangedListener();
- outlinePage.addSelectionChangedListener(
- outlineSelectionChangedListener);
- }
-
- return outlinePage;
- }
-
- return super.getAdapter(adapter);
- }
-
- /*
- * @see IReconcilingParticipant#reconciled()
- */
- public void reconciled() {
- Shell shell = getSite().getShell();
- if ((shell != null) && !shell.isDisposed()) {
- shell.getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (outlinePage != null) {
- outlinePage.update();
- }
- }
- });
- }
- }
-
- /*
- * @see org.eclipse.ui.editors.text.TextEditor#initializeEditor()
- */
- protected void initializeEditor() {
- super.initializeEditor();
-
- XMLTextTools xmlTextTools = XMLPlugin.getDefault().getXMLTextTools();
- setSourceViewerConfiguration(new XMLConfiguration(xmlTextTools, this));
- setDocumentProvider(new XMLDocumentProvider());
- }
-
- /*
- * @see org.eclipse.ui.texteditor.AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent)
- */
- protected boolean affectsTextPresentation(PropertyChangeEvent event) {
- return XMLPlugin.getDefault().getXMLTextTools().affectsBehavior(event);
- }
-
- void highlightElement(ISourceReference element,
- boolean moveCursor) {
- if (element != null) {
- IRegion highlightRegion = element.getSourceRegion();
- setHighlightRange(highlightRegion.getOffset(),
- highlightRegion.getLength(), moveCursor);
- } else {
- resetHighlightRange();
+ return super.getAdapter(adapter);
+ }
+
+ /*
+ * @see IReconcilingParticipant#reconciled()
+ */
+ public void reconciled() {
+ Shell shell = getSite().getShell();
+ if ((shell != null) && !shell.isDisposed()) {
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (outlinePage != null) {
+ outlinePage.update();
+ }
}
+ });
}
+ }
+
+ /*
+ * @see org.eclipse.ui.editors.text.TextEditor#initializeEditor()
+ */
+ protected void initializeEditor() {
+ super.initializeEditor();
+
+ XMLTextTools xmlTextTools = XMLPlugin.getDefault().getXMLTextTools();
+ setSourceViewerConfiguration(new XMLConfiguration(xmlTextTools, this));
+ setDocumentProvider(new XMLDocumentProvider());
- protected void createActions() {
- super.createActions();
-
- IAction action = new ContentAssistAction(XMLEditorMessages.getResourceBundle(),
- "ContentAssistProposal.", this); //$NON-NLS-1$
- action
- .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
- setAction("ContentAssistProposal", action); //$NON-NLS-1$
- markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$
-
-// IAction action= new TextOperationAction(
-// TemplateMessages.getResourceBundle(),
-// "Editor." + TEMPLATE_PROPOSALS + ".", //$NON-NLS-1$ //$NON-NLS-2$
-// this,
-// ISourceViewer.CONTENTASSIST_PROPOSALS);
-// action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-// setAction(TEMPLATE_PROPOSALS, action);
-// markAsStateDependentAction(TEMPLATE_PROPOSALS, true);
- }
-}
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ fShowExternalPreviewAction.setEditor(this);
+ fShowExternalPreviewAction.update();
+ if (fShowExternalPreviewAction != null)
+ fShowExternalPreviewAction.doRun(fType);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent)
+ */
+ protected boolean affectsTextPresentation(PropertyChangeEvent event) {
+ return XMLPlugin.getDefault().getXMLTextTools().affectsBehavior(event);
+ }
+
+ void highlightElement(ISourceReference element, boolean moveCursor) {
+ if (element != null) {
+ IRegion highlightRegion = element.getSourceRegion();
+ setHighlightRange(highlightRegion.getOffset(), highlightRegion.getLength(), moveCursor);
+ } else {
+ resetHighlightRange();
+ }
+ }
+
+ protected void createActions() {
+ super.createActions();
+
+ IAction action = new ContentAssistAction(XMLEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); //$NON-NLS-1$
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ setAction("ContentAssistProposal", action); //$NON-NLS-1$
+ markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$
+
+ // IAction action= new TextOperationAction(
+ // TemplateMessages.getResourceBundle(),
+ // "Editor." + TEMPLATE_PROPOSALS + ".", //$NON-NLS-1$ //$NON-NLS-2$
+ // this,
+ // ISourceViewer.CONTENTASSIST_PROPOSALS);
+ // action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ // setAction(TEMPLATE_PROPOSALS, action);
+ // markAsStateDependentAction(TEMPLATE_PROPOSALS, true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorSaved()
+ */
+ protected void editorSaved() {
+ super.editorSaved();
+ ShowExternalPreviewAction a = ShowExternalPreviewAction.getInstance();
+ if (a != null) {
+ a.refresh(fType);
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package net.sourceforge.phpeclipse.xml.ui.internal.editor;
+
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Common base class for action contributors for Java editors.
+ */
+public class XMLEditorActionContributor extends BasicTextEditorActionContributor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ ITextEditor textEditor = null;
+ if (part instanceof ITextEditor)
+ textEditor = (ITextEditor) part;
+
+ if (textEditor != null) {
+ IFile file = null;
+ IEditorInput editorInput = textEditor.getEditorInput();
+
+ if (editorInput instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) editorInput).getFile();
+ }
+
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ fShowExternalPreviewAction.setEditor(textEditor);
+ fShowExternalPreviewAction.update();
+ if (fShowExternalPreviewAction != null)
+ fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.PHP_TYPE);
+ }
+ }
+}
--- /dev/null
+package net.sourceforge.phpeclipse.xml.ui.internal.preferences;
+
+import net.sourceforge.phpeclipse.ui.PreferenceConstants;
+import net.sourceforge.phpeclipse.ui.templates.template.BasicCompletionProcessor;
+import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLPartitionScanner;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+
+
+public class ContentAssistPreference {
+ /** Preference key for html content assist auto activation triggers */
+ private final static String AUTOACTIVATION_TRIGGERS_HTML = PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_HTML;
+
+ /** Preference key for alphabetic ordering of proposals */
+ private final static String ORDER_PROPOSALS = PreferenceConstants.CODEASSIST_ORDER_PROPOSALS;
+
+ private static BasicCompletionProcessor getHTMLProcessor(ContentAssistant assistant) {
+ IContentAssistProcessor p = assistant.getContentAssistProcessor(XMLPartitionScanner.XML_TAG);
+ if (p instanceof BasicCompletionProcessor)
+ return (BasicCompletionProcessor) p;
+ return null;
+ }
+
+ private static void configureHTMLProcessor(ContentAssistant assistant, IPreferenceStore store) {
+ BasicCompletionProcessor hcp = getHTMLProcessor(assistant);
+ if (hcp == null)
+ return;
+
+ String triggers = store.getString(AUTOACTIVATION_TRIGGERS_HTML);
+ if (triggers != null)
+ hcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
+
+ boolean enabled;
+ // boolean enabled = store.getBoolean(CASE_SENSITIVITY);
+ // jdcp.restrictProposalsToMatchingCases(enabled);
+
+ enabled = store.getBoolean(ORDER_PROPOSALS);
+ // hcp.orderProposalsAlphabetically(enabled);
+ }
+ private static void changeHTMLProcessor(ContentAssistant assistant, IPreferenceStore store, String key) {
+ BasicCompletionProcessor jdcp = getHTMLProcessor(assistant);
+ if (jdcp == null)
+ return;
+
+ if (AUTOACTIVATION_TRIGGERS_HTML.equals(key)) {
+ String triggers = store.getString(AUTOACTIVATION_TRIGGERS_HTML);
+ if (triggers != null)
+ jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
+ // } else if (CASE_SENSITIVITY.equals(key)) {
+ // boolean enabled = store.getBoolean(CASE_SENSITIVITY);
+ // jdcp.restrictProposalsToMatchingCases(enabled);
+ } else if (ORDER_PROPOSALS.equals(key)) {
+ boolean enable = store.getBoolean(ORDER_PROPOSALS);
+ // jdcp.orderProposalsAlphabetically(enable);
+ }
+ }
+}
phpProblemName=PHP Problem
transientPHPProblemName=Transient PHP Problem
phpTaskName=PHP Task
-viewCategoryName=PHP
+viewCategoryName = PHPeclipse Web Development
phpEditorTextHoversName=PHP Editor Text Hovers
perspectivePHP.name=PHP
#
phpEditorName=PHP Editor
phpConsoleView=PHP Console
-phpBrowserView=PHP Browser
phpFileExtension=php
php3FileExtension=php3
php4FileExtension=php4
name="nature"
value="net.sourceforge.phpeclipse.phpnature">
</filter>
- </page> -->
+ </page>
<page
objectClass="org.eclipse.core.resources.IProject"
name="PHP Project Settings"
name="nature"
value="net.sourceforge.phpeclipse.phpnature">
</filter>
- </page>
+ </page> -->
<page
objectClass="org.eclipse.core.resources.IProject"
name="%todoPageName"
value="net.sourceforge.phpeclipse.phpnature">
</filter>
</page>
- <page
+ <!-- <page
objectClass="org.eclipse.core.resources.IFile"
name="PHP File Settings"
class="net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences"
id="net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences">
- </page>
+ </page> -->
</extension>
<!-- <extension
point="org.eclipse.ui.views">
category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
class="net.sourceforge.phpeclipse.PHPSyntaxEditorPreferencePage"
id="net.sourceforge.phpeclipse.preference.PHPSyntaxEditorPreferencePage">
- </page> -->
+ </page>
<page
category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
name="PHP Project Defaults"
class="net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences"
id="net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences">
- </page>
+ </page>
<page
category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
name="PHP Browser Preview"
class="net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences"
id="net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences">
- </page>
+ </page> -->
<page
name="%compilerOptionsPrefName"
category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
class="net.sourceforge.phpeclipse.views.PHPConsole"
id="net.sourceforge.phpeclipse.views.phpconsoleview">
</view>
- <view
- name="%phpBrowserView"
- icon="icons/obj16/php.gif"
- category="net.sourceforge.phpeclipse.views.category"
- class="net.sourceforge.phpeclipse.views.browser.BrowserView"
- id="net.sourceforge.phpeclipse.views.browser">
- </view>
</extension>
<!-- external tools -->
package net.sourceforge.phpdt.externaltools.variable;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.jface.preference.IPreferenceStore;
public String getText(String varTag, String varValue, ExpandVariableContext context) {
IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
- return store.getString(PHPeclipsePlugin.PHP_LOCALHOST_PREF);
+ return store.getString(WebUI.PHP_LOCALHOST_PREF);
}
}
package net.sourceforge.phpdt.externaltools.variable;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.preference.IPreferenceStore;
IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
String localhostURL = path.toString();
String lowerCaseFileName = localhostURL.toLowerCase();
- String documentRoot = store.getString(PHPeclipsePlugin.PHP_DOCUMENTROOT_PREF);
+ String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF);
documentRoot = documentRoot.replace('\\', '/');
documentRoot = documentRoot.toLowerCase();
if (lowerCaseFileName.startsWith(documentRoot)) {
localhostURL = localhostURL.substring(documentRoot.length());
- localhostURL = store.getString(PHPeclipsePlugin.PHP_LOCALHOST_PREF)+ localhostURL;
+ localhostURL = store.getString(WebUI.PHP_LOCALHOST_PREF)+ localhostURL;
}
return localhostURL;
}
isPHTML_FileName(name) ||
isINC_FileName(name);
}
- // static public boolean isPHPFile(String extension) {
- // if ("php".equalsIgnoreCase(extension)
- // || "php3".equalsIgnoreCase(extension)
- // || "php4".equalsIgnoreCase(extension)
- // || "inc".equalsIgnoreCase(extension)) {
- // return true;
- // }
- // return false;
- // }
-
+
/**
* Returns true iff str.toLowerCase().endsWith(".php")
* implementation is not creating extra strings.
public static final String EDITOR_CORRECTION_INDICATION = null;
public static final String PHP_OBFUSCATOR_DEFAULT = "_php_obfuscator_default";
- public static final String PHP_BOOKMARK_DEFAULT = "_php_bookmark_default";
- public static final String PHP_LOCALHOST_PREF = "_php_localhost";
- public static final String PHP_DOCUMENTROOT_PREF = "_php_documentroot";
-
- public static final String PHP_AUTO_PREVIEW_DEFAULT = "_auto_preview";
- public static final String PHP_BRING_TO_TOP_PREVIEW_DEFAULT = "_bring_to_top_preview";
- public static final String PHP_SHOW_HTML_FILES_LOCAL = "_show_html_files_local";
+// public static final String PHP_BOOKMARK_DEFAULT = "_php_bookmark_default";
+// public static final String PHP_LOCALHOST_PREF = "_php_localhost";
+// public static final String PHP_DOCUMENTROOT_PREF = "_php_documentroot";
+//
+// public static final String PHP_AUTO_PREVIEW_DEFAULT = "_auto_preview";
+// public static final String PHP_BRING_TO_TOP_PREVIEW_DEFAULT = "_bring_to_top_preview";
+// public static final String PHP_SHOW_HTML_FILES_LOCAL = "_show_html_files_local";
}
\ No newline at end of file
package net.sourceforge.phpeclipse;
-import net.sourceforge.phpeclipse.views.browser.BrowserView;
+import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.search.ui.NewSearchUI;
// store.setDefault(LOCALHOST_PREF, "http://localhost");
// store.setDefault(DOCUMENTROOT_PREF,
// getWorkspace().getRoot().getLocation().toString());
- store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
- store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
- .getLocation().toString());
+// store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
+// store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
+// .getLocation().toString());
// store.setDefault(SHOW_EXTERNAL_PREVIEW_PREF, "true");
store.setDefault(USE_EXTERNAL_BROWSER_PREF, "false");
store.setDefault(SHOW_OUTPUT_IN_CONSOLE, "true");
store.setDefault(PHP_OBFUSCATOR_DEFAULT, "c:\\temp");
- store.setDefault(PHP_BOOKMARK_DEFAULT, "");
-
- store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "true");
- store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "true");
- store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
+// store.setDefault(PHP_BOOKMARK_DEFAULT, "");
+//
+// store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "true");
+// store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "true");
+// store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
String windowsSystem = Platform.getWS();
if (jvm == WINDOWS_9x) {
import java.text.MessageFormat;
import java.util.Iterator;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.overlaypages.Util;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import net.sourceforge.phpeclipse.views.PHPConsole;
-import net.sourceforge.phpeclipse.views.browser.BrowserView;
+import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
//import org.eclipse.update.internal.ui.UpdatePerspective;
//import org.eclipse.update.internal.ui.views.IEmbeddedWebBrowser;
public class PHPEclipseShowAction implements IObjectActionDelegate {
// single file:
IFile file = (IFile) resource;
String localhostURL;
- if ((localhostURL = getLocalhostURL(store, (IFile) resource)) == null) {
+ if ((localhostURL = ShowExternalPreviewAction.getLocalhostURL(store, (IFile) resource)) == null) {
MessageDialog.openInformation(shell,
"Couldn't create localhost URL",
"Please configure your localhost and documentRoot");
*/
public void selectionChanged(IAction action, ISelection selection) {
}
- public static String getLocalhostURL(IPreferenceStore store, IFile file) {
- if (store == null) {
- store = PHPeclipsePlugin.getDefault().getPreferenceStore();
- }
- // IPath path = file.getFullPath();
- String localhostURL = file.getLocation().toString();
- String lowerCaseFileName = localhostURL.toLowerCase();
- // String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
- String documentRoot = Util.getMiscProjectsPreferenceValue(
- file.getProject(), IPreferenceConstants.PHP_DOCUMENTROOT_PREF);
-
- documentRoot = documentRoot.replace('\\', '/');
- documentRoot = documentRoot.toLowerCase();
-
- if (lowerCaseFileName.startsWith(documentRoot)) {
- localhostURL = localhostURL.substring(documentRoot.length());
- } else {
- return null;
- }
-// return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL;
- return Util.getMiscProjectsPreferenceValue(file.getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF) + localhostURL;
- }
+// public static String getLocalhostURL(IPreferenceStore store, IFile file) {
+// if (store == null) {
+// store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+// }
+// // IPath path = file.getFullPath();
+// String localhostURL = file.getLocation().toString();
+// String lowerCaseFileName = localhostURL.toLowerCase();
+// // String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
+// String documentRoot = Util.getMiscProjectsPreferenceValue(
+// file.getProject(), IPreferenceConstants.PHP_DOCUMENTROOT_PREF);
+//
+// documentRoot = documentRoot.replace('\\', '/');
+// documentRoot = documentRoot.toLowerCase();
+//
+// if (lowerCaseFileName.startsWith(documentRoot)) {
+// localhostURL = localhostURL.substring(documentRoot.length());
+// } else {
+// return null;
+// }
+//// return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL;
+// return Util.getMiscProjectsPreferenceValue(file.getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF) + localhostURL;
+// }
public static void open(final URL url, final Shell shell,
final String dialogTitle) {
import java.sql.SQLException;
import java.util.ArrayList;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.overlaypages.Util;
import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
+import net.sourceforge.phpeclipse.ui.WebUI;
+import net.sourceforge.phpeclipse.ui.overlaypages.Util;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.text.BadLocationException;
BookmarkCollection sqlBookMarks = BookmarkCollection.getInstance();
if (sqlBookMarks != null) {
String bookmarkString = Util.getMiscProjectsPreferenceValue(project,
- IPreferenceConstants.PHP_BOOKMARK_DEFAULT);
+ WebUI.PHP_BOOKMARK_DEFAULT);
if (bookmarkString != null && !bookmarkString.equals("")) {
Bookmark bookmark = sqlBookMarks.find(bookmarkString);
ArrayList sqlList = new ArrayList();
import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.WebUI;
import net.sourceforge.phpeclipse.views.PHPConsole;
import org.eclipse.jface.action.IAction;
public void run(IAction action) {
final IPreferenceStore store =
PHPeclipsePlugin.getDefault().getPreferenceStore();
- String documentRoot = store.getString(PHPeclipsePlugin.PHP_DOCUMENTROOT_PREF);
+ String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF);
// replace backslash with slash in the DocumentRoot under Windows
documentRoot = documentRoot.replace('\\', '/');
String[] arguments = { documentRoot };
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Common Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/cpl-v10.html
+/***********************************************************************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
+ **********************************************************************************************************************************/
package net.sourceforge.phpeclipse.phpeditor;
import net.sourceforge.phpdt.ui.actions.PHPdtActionConstants;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.ITextEditor;
-public class CompilationUnitEditorActionContributor
- extends
- BasicEditorActionContributor {
- protected ShowExternalPreviewAction fShowExternalPreviewAction;
- public CompilationUnitEditorActionContributor() {
- super();
- fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
- }
+public class CompilationUnitEditorActionContributor extends BasicEditorActionContributor {
+ public CompilationUnitEditorActionContributor() {
+ super();
+ }
- /*
- * @see IEditorActionBarContributor#setActiveEditor(IEditorPart)
- */
- public void setActiveEditor(IEditorPart part) {
- super.setActiveEditor(part);
+ /*
+ * @see IEditorActionBarContributor#setActiveEditor(IEditorPart)
+ */
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
- ITextEditor textEditor = null;
- if (part instanceof ITextEditor)
- textEditor = (ITextEditor) part;
+ ITextEditor textEditor = null;
+ if (part instanceof ITextEditor)
+ textEditor = (ITextEditor) part;
- // Source menu.
- IActionBars bars = getActionBars();
- bars.setGlobalActionHandler(PHPdtActionConstants.COMMENT, getAction(
- textEditor, "Comment")); //$NON-NLS-1$
- bars.setGlobalActionHandler(PHPdtActionConstants.UNCOMMENT, getAction(
- textEditor, "Uncomment")); //$NON-NLS-1$
- bars.setGlobalActionHandler(PHPdtActionConstants.TOGGLE_COMMENT,
- getAction(textEditor, "ToggleComment")); //$NON-NLS-1$
- bars.setGlobalActionHandler(PHPdtActionConstants.FORMAT, getAction(
- textEditor, "Format")); //$NON-NLS-1$
-// bars.setGlobalActionHandler(PHPdtActionConstants.ADD_BLOCK_COMMENT,
-// getAction(textEditor, "AddBlockComment")); //$NON-NLS-1$
-// bars.setGlobalActionHandler(PHPdtActionConstants.REMOVE_BLOCK_COMMENT,
-// getAction(textEditor, "RemoveBlockComment")); //$NON-NLS-1$
-// bars.setGlobalActionHandler(PHPdtActionConstants.INDENT, getAction(
-// textEditor, "Indent")); //$NON-NLS-1$ //$NON-NLS-2$
+ // Source menu.
+ IActionBars bars = getActionBars();
+ bars.setGlobalActionHandler(PHPdtActionConstants.COMMENT, getAction(textEditor, "Comment")); //$NON-NLS-1$
+ bars.setGlobalActionHandler(PHPdtActionConstants.UNCOMMENT, getAction(textEditor, "Uncomment")); //$NON-NLS-1$
+ bars.setGlobalActionHandler(PHPdtActionConstants.TOGGLE_COMMENT, getAction(textEditor, "ToggleComment")); //$NON-NLS-1$
+ bars.setGlobalActionHandler(PHPdtActionConstants.FORMAT, getAction(textEditor, "Format")); //$NON-NLS-1$
+ // bars.setGlobalActionHandler(PHPdtActionConstants.ADD_BLOCK_COMMENT,
+ // getAction(textEditor, "AddBlockComment")); //$NON-NLS-1$
+ // bars.setGlobalActionHandler(PHPdtActionConstants.REMOVE_BLOCK_COMMENT,
+ // getAction(textEditor, "RemoveBlockComment")); //$NON-NLS-1$
+ // bars.setGlobalActionHandler(PHPdtActionConstants.INDENT, getAction(
+ // textEditor, "Indent")); //$NON-NLS-1$ //$NON-NLS-2$
- if (textEditor != null) {
- IFile file = null;
- IEditorInput editorInput = textEditor.getEditorInput();
+ if (textEditor != null) {
+ IFile file = null;
+ IEditorInput editorInput = textEditor.getEditorInput();
- if (editorInput instanceof IFileEditorInput) {
- file = ((IFileEditorInput) editorInput).getFile();
- }
+ if (editorInput instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) editorInput).getFile();
+ }
- PHPeclipsePlugin.getDefault().setLastEditorFile(file);
+ PHPeclipsePlugin.getDefault().setLastEditorFile(file);
- fShowExternalPreviewAction.setEditor(textEditor);
- fShowExternalPreviewAction.update();
- IPreferenceStore store = PHPeclipsePlugin.getDefault()
- .getPreferenceStore();
- IAction a = ShowExternalPreviewAction.getInstance();
- if (a != null)
- a.run();
- }
- }
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ fShowExternalPreviewAction.setEditor(textEditor);
+ fShowExternalPreviewAction.update();
+ if (fShowExternalPreviewAction != null)
+ fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.PHP_TYPE);
+ }
+ }
}
\ No newline at end of file
import net.sourceforge.phpdt.ui.actions.GenerateActionGroup;
import net.sourceforge.phpdt.ui.text.JavaTextTools;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
import org.eclipse.core.internal.runtime.ListenerList;
import org.eclipse.core.resources.IFile;
} else
performSave(false, progressMonitor);
}
- ShowExternalPreviewAction a = ShowExternalPreviewAction.getInstance();
- if (a != null) {
- a.refresh();
- }
}
public boolean isSaveAsAllowed() {
return fReconcilerLock;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorSaved()
+ */
+ protected void editorSaved() {
+ super.editorSaved();
+ ShowExternalPreviewAction a = ShowExternalPreviewAction.getInstance();
+ if (a != null) {
+ a.refresh(ShowExternalPreviewAction.PHP_TYPE);
+ }
+ }
}
\ No newline at end of file
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Map;
import java.util.SortedMap;
-import net.sourceforge.phpdt.core.IBuffer;
-import net.sourceforge.phpdt.core.ICompilationUnit;
-import net.sourceforge.phpdt.core.IJavaProject;
-import net.sourceforge.phpdt.core.JavaModelException;
import net.sourceforge.phpdt.core.ToolFactory;
import net.sourceforge.phpdt.core.compiler.ITerminalSymbols;
import net.sourceforge.phpdt.core.compiler.InvalidInputException;
-import net.sourceforge.phpdt.internal.compiler.IProblemFactory;
-import net.sourceforge.phpdt.internal.compiler.SourceElementParser;
-import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions;
import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
-import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory;
-import net.sourceforge.phpdt.internal.core.CompilationUnit;
-import net.sourceforge.phpdt.internal.core.CompilationUnitStructureRequestor;
-import net.sourceforge.phpdt.internal.core.JavaModelManager;
-import net.sourceforge.phpdt.internal.core.JavaProject;
import net.sourceforge.phpdt.internal.corext.template.ContextType;
import net.sourceforge.phpdt.internal.corext.template.ContextTypeRegistry;
import net.sourceforge.phpdt.internal.corext.template.php.CompilationUnitContextType;
import net.sourceforge.phpdt.internal.ui.text.template.SQLProposal;
import net.sourceforge.phpdt.internal.ui.text.template.TemplateEngine;
import net.sourceforge.phpdt.ui.IWorkingCopyManager;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
-import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
-import net.sourceforge.phpeclipse.overlaypages.Util;
import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr;
+import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
+import net.sourceforge.phpeclipse.ui.overlaypages.Util;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;