com.pnp.xfeature.project
Class ProjectFormEditor

java.lang.Object
  extended by FormEditor
      extended by com.pnp.xfeature.project.ProjectFormEditor

public class ProjectFormEditor
extends FormEditor

This class is the main class of the project file editor. It is a multi page editor, which is filled with two pages. The first page represented by the class BuilderFormPage shows the content of the file in a graphical user interface, the second page represented by the class XMLEditor shows the content of the file as a text file.

Author:
Ondrej Rohlik, initial contribution Valerio Buerker

Constructor Summary
ProjectFormEditor()
           
 
Method Summary
 void createBuildXMLFile()
          Creates the Ant build file from the input of the editor.
 void createBuildXMLTree(ProjectFormPage page)
          Creates the data structure.
 void doSave(IProgressMonitor monitor)
           
 void doSaveAs()
          Not implemented.
 java.lang.Object getAdapter(java.lang.Class key)
          Outline page is created here.
 ProjectXMLTree getBuildXMLTree()
          Returns the XML tree.
 ProjectFormPage getProjectFormPage()
          Return the form page of the editor.
 boolean isDirty()
           
 boolean isPageValable()
          Validates the content of the XML editor against the aspectX schema.
 boolean isSaveAsAllowed()
           
 void refreshOutlinePage()
          Updates the outline page of the editor.
 void setIsPageModified(boolean b)
          Called in order to inform the editor that the content of the form page has changed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectFormEditor

public ProjectFormEditor()
Method Detail

doSave

public void doSave(IProgressMonitor monitor)
See Also:
org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)

doSaveAs

public void doSaveAs()
Not implemented.

See Also:
org.eclipse.ui.ISaveablePart#doSaveAs()

isSaveAsAllowed

public boolean isSaveAsAllowed()
See Also:
org.eclipse.ui.ISaveablePart#isSaveAsAllowed()

isDirty

public boolean isDirty()
See Also:
org.eclipse.ui.ISaveablePart#isDirty()

getAdapter

public java.lang.Object getAdapter(java.lang.Class key)
Outline page is created here.

See Also:
org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)

createBuildXMLTree

public void createBuildXMLTree(ProjectFormPage page)
Creates the data structure.

Parameters:
page - form page of the editor

getBuildXMLTree

public ProjectXMLTree getBuildXMLTree()
Returns the XML tree.

Returns:
XML tree

getProjectFormPage

public ProjectFormPage getProjectFormPage()
Return the form page of the editor.

Returns:
form page

setIsPageModified

public void setIsPageModified(boolean b)
Called in order to inform the editor that the content of the form page has changed.

Parameters:
b - changed information

createBuildXMLFile

public void createBuildXMLFile()
Creates the Ant build file from the input of the editor.


refreshOutlinePage

public void refreshOutlinePage()
Updates the outline page of the editor.


isPageValable

public boolean isPageValable()
Validates the content of the XML editor against the aspectX schema. Returns true if the content is valid, otherwise false.

Returns:
validation result


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.