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

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.util
Class EditorUtil

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.diagram.ui.resources.editor.util.EditorUtil
Direct Known Subclasses:
IDEEditorUtil

public class EditorUtil
extends java.lang.Object

Diagram Utility Class for Editor.


Constructor Summary
EditorUtil ()
           
 
Method Summary
static  IFile createNewDiagramFile ( DiagramFileCreator diagramFileCreator, IPath containerFullPath, java.lang.String fileName, java.io.InputStream initialContents, java.lang.String kind, Shell shell, IProgressMonitor progressMonitor, PreferencesHint preferencesHint)
          Creates a new diagram file resource in the selected container and with the selected name.
static  IPath getDefaultDiagramPath (java.util.List elements, java.lang.String diagramKind)
          Gets the default diagram path for a new diagram that will contain the elements in elements.
static java.io.InputStream getInitialContents ()
          Method getInitialContents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorUtil

public EditorUtil()
Method Detail

createNewDiagramFile

public static 
IFile createNewDiagramFile(
DiagramFileCreator diagramFileCreator,
                                         
IPath containerFullPath,
                                         java.lang.String fileName,
                                         java.io.InputStream initialContents,
                                         java.lang.String kind,
                                         
Shell shell,
                                         
IProgressMonitor progressMonitor,
                                         
PreferencesHint preferencesHint)
Creates a new diagram file resource in the selected container and with the selected name. Creates any missing resource containers along the path; does nothing if the container resources already exist. Creates a new editing domain for this diagram.

In normal usage, this method is invoked after the user has pressed Finish on the wizard; the enablement of the Finish button implies that all controls on on this page currently contain valid values.

Note that this page caches the new file once it has been successfully created; subsequent invocations of this method will answer the same file resource without attempting to create it again.

This method should be called within a workspace modify operation since it creates resources.

Parameters:
preferencesHint - The preference hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. The preference hint is mapped to a preference store in the preference registry <@link DiagramPreferencesRegistry>.
Returns:
the created file resource, or null if the file was not created

getDefaultDiagramPath

public static 
IPath getDefaultDiagramPath(java.util.List elements,
                                          java.lang.String diagramKind)
Gets the default diagram path for a new diagram that will contain the elements in elements. Returns null if there is no IVizUIHandler to handle the visualization, or there is a handler, but it has no default diagram path for the elements.

Parameters:
elements - the list of elements being visualized on a new class diagram
diagramKind - the kind of diagram we want to create
Returns:
the default diagram path for a new diagram that will contain the elements in elements. Returns null if there is no IVizUIHandler to handle the visualization, or there is a handler, but it has no default diagram path for the elements.

getInitialContents

public static java.io.InputStream getInitialContents()
Method getInitialContents. Gets the initial contents of the UML Visualizer diagram file. Currently it returns an empty byte stream.

Returns:
Byte stream that will initially populate the UML Visualizer diagram file.

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