Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards
Class EditorWizardPage

java.lang.Object
  extended by 

org.eclipse.jface.dialogs.DialogPage
      extended by 

org.eclipse.jface.wizard.WizardPage
          extended by 

org.eclipse.ui.dialogs.WizardNewFileCreationPage
              extended by 
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards.EditorWizardPage
All Implemented Interfaces:
IDialogPage, IMessageProvider, IWizardPage, Listener

public abstract class EditorWizardPage
extends WizardNewFileCreationPage


Field Summary
protected   IFile diagramFile
          the diagram file for the newlt created diagram
protected  boolean openNewlyCreatedDiagramEditor
          A flag indicating whether or not to open the editor of the newly created diagram The default is true
protected   IWorkbench workbench
          workbench
 
Fields inherited from interface org.eclipse.jface.dialogs. IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
EditorWizardPage (java.lang.String pageName, IWorkbench aWorkbench, IStructuredSelection selection)
          EditorWizardPage constructor
 
Method Summary
  IFile createAndOpenDiagram ( IPath containerPath, java.lang.String fileName, java.io.InputStream initialContents, java.lang.String kind, IWorkbenchWindow dWindow, IProgressMonitor progressMonitor, boolean saveDiagram)
           
 void createControl ( Composite parent)
           
 boolean doFinish ( IProgressMonitor monitor)
           
 boolean finish ()
          Performs the operations necessary to create and open the diagram
protected  java.lang.String getDefaultFileName ()
           
  IFile getDiagramFile ()
          Accessor for the diagram's file
abstract   DiagramFileCreator getDiagramFileCreator ()
           
protected  java.lang.String getDiagramKind ()
           
 java.lang.String getFileName ()
          Returns the current file name as entered by the user, or its anticipated initial value.
protected  java.io.InputStream getInitialContents ()
           
  IStructuredSelection getSelection ()
          Accessor for selected elements
protected  void initialPopulateContainerNameField ()
           
 boolean isOpenNewlyCreatedDiagramEditor ()
          Answers whether or not this Wizard will open the editor of the newly created diagram
 void setOpenNewlyCreatedDiagramEditor (boolean openNewlyCreatedDiagramEditor)
          Sets a flag indicating whether or not the newly created diagram editor should be opened
protected  boolean validatePage ()
           
 
Methods inherited from class org.eclipse.ui.dialogs. WizardNewFileCreationPage
createAdvancedControls, createFile, createFileHandle, createLinkTarget, createNewFile, createRule, getContainerFullPath, getFileExtension, getNewFileLabel, handleAdvancedButtonSelect, handleEvent, setAllowExistingResources, setContainerFullPath, setFileExtension, setFileName, setVisible, validateLinkedResource
 
Methods inherited from class org.eclipse.jface.wizard. WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs. DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs. IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
 

Field Detail

workbench

protected final 
IWorkbench workbench
workbench


diagramFile

protected 
IFile diagramFile
the diagram file for the newlt created diagram


openNewlyCreatedDiagramEditor

protected boolean openNewlyCreatedDiagramEditor
A flag indicating whether or not to open the editor of the newly created diagram The default is true

Constructor Detail

EditorWizardPage

public EditorWizardPage(java.lang.String pageName,
                        
IWorkbench aWorkbench,
                        
IStructuredSelection selection)
EditorWizardPage constructor

Parameters:
pageName - the page name
aWorkbench - workbench the workbench this page will be displayed in
selection - selection the current selection
Method Detail

doFinish

public boolean doFinish(
IProgressMonitor monitor)
Parameters:
monitor - the IProgressMonitor to use to indicate progress and check for cancellation
Returns:
boolean indicating whether the creation and opening the Diagram was successful

createAndOpenDiagram

public 
IFile createAndOpenDiagram(
IPath containerPath,
                                  java.lang.String fileName,
                                  java.io.InputStream initialContents,
                                  java.lang.String kind,
                                  
IWorkbenchWindow dWindow,
                                  
IProgressMonitor progressMonitor,
                                  boolean saveDiagram)
Parameters:
containerPath -
fileName -
initialContents -
kind -
dWindow -
progressMonitor -
saveDiagram -
Returns:

isOpenNewlyCreatedDiagramEditor

public boolean isOpenNewlyCreatedDiagramEditor()
Answers whether or not this Wizard will open the editor of the newly created diagram

Returns:
Returns the openNewlyCreatedDiagramEditor.

setOpenNewlyCreatedDiagramEditor

public void setOpenNewlyCreatedDiagramEditor(boolean openNewlyCreatedDiagramEditor)
Sets a flag indicating whether or not the newly created diagram editor should be opened

Parameters:
openNewlyCreatedDiagramEditor - The openNewlyCreatedDiagramEditor to set.

finish

public boolean finish()
Performs the operations necessary to create and open the diagram

Returns:
boolean indicating whether the creation and opening the Diagram was successful

getDiagramFile

public final 
IFile getDiagramFile()
Accessor for the diagram's file

Returns:
IFile the file owning the diagram

getDefaultFileName

protected java.lang.String getDefaultFileName()
Returns:
the default file name

getDiagramFileCreator

public abstract 
DiagramFileCreator getDiagramFileCreator()
Returns:
the diagram file creator

getDiagramKind

protected java.lang.String getDiagramKind()
Returns:
the diagram kind

getInitialContents

protected java.io.InputStream getInitialContents()
Overrides:
getInitialContents in class WizardNewFileCreationPage

getFileName

public java.lang.String getFileName()
Returns the current file name as entered by the user, or its anticipated initial value.

Overrides:
getFileName in class WizardNewFileCreationPage
Returns:
the file name, its anticipated initial value, or null if no file name is known

validatePage

protected boolean validatePage()
Overrides:
validatePage in class WizardNewFileCreationPage

getSelection

public final 
IStructuredSelection getSelection()
Accessor for selected elements

Returns:
IStructuredSelection the selection holding the elements to be displayed on the diagram

createControl

public void createControl(
Composite parent)
Specified by:
createControl in interface IDialogPage
Overrides:
createControl in class WizardNewFileCreationPage

initialPopulateContainerNameField

protected void initialPopulateContainerNameField()
Overrides:
initialPopulateContainerNameField in class WizardNewFileCreationPage

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire