diff --git a/BlueBerry/Bundles/org.blueberry.core.runtime/files.cmake b/BlueBerry/Bundles/org.blueberry.core.runtime/files.cmake
index 74b176feee..db3f12cd95 100644
--- a/BlueBerry/Bundles/org.blueberry.core.runtime/files.cmake
+++ b/BlueBerry/Bundles/org.blueberry.core.runtime/files.cmake
@@ -1,31 +1,33 @@
set(MOC_H_FILES
src/internal/berryPluginActivator.h
src/internal/berryPreferencesService.h
)
set(SRC_CPP_FILES
berryIAdaptable.cpp
berryIAdapterManager.cpp
+ berryIPreferences.cpp
+ berryIBerryPreferences.cpp
berryIPreferencesService.cpp
berryPlatformObject.cpp
berryRuntime.cpp
berryBackingStoreException.cpp
)
set(INTERNAL_CPP_FILES
berryAbstractPreferencesStorage.cpp
berryPluginActivator.cpp
berryPreferences.cpp
berryPreferencesService.cpp
berryXMLPreferencesStorage.cpp
)
set(CPP_FILES )
foreach(file ${SRC_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/${file})
endforeach(file ${SRC_CPP_FILES})
foreach(file ${INTERNAL_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/internal/${file})
endforeach(file ${INTERNAL_CPP_FILES})
diff --git a/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.cpp b/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.cpp
new file mode 100644
index 0000000000..c583e5ba6d
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIBerryPreferences.h"
+
+namespace berry {
+
+IBerryPreferences::~IBerryPreferences ()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.h b/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.h
index 7456fbe6d4..cc47b94504 100644
--- a/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.h
+++ b/BlueBerry/Bundles/org.blueberry.core.runtime/src/berryIBerryPreferences.h
@@ -1,33 +1,35 @@
#ifndef BERRYIBERRYPREFERENCES_H_
#define BERRYIBERRYPREFERENCES_H_
#include
* This interface allows applications to store and retrieve user and system
* preference data. This data is stored persistently in an
* implementation-dependent backing store. Typical implementations include flat
* files, OS-specific registries, directory servers and SQL databases.
*
*
* For each bundle, there is a separate tree of nodes for each user, and one for
* system preferences. The precise description of "user" and "system" will vary
* from one bundle to another. Typical information stored in the user preference
* tree might include font choice, and color choice for a bundle which interacts
* with the user via a servlet. Typical information stored in the system
* preference tree might include installation data, or things like high score
* information for a game program.
*
*
* Nodes in a preference tree are named in a similar fashion to directories in a
* hierarchical file system. Every node in a preference tree has a node name
* (which is not necessarily unique), a unique absolute path name ,
* and a path name relative to each ancestor including itself.
*
*
* The root node has a node name of the empty
* The root node has an absolute path name of
* A node n 's path name relative to its ancestor a is simply the
* string that must be appended to a 's absolute path name in order to
* form n 's absolute path name, with the initial slash character (if
* present) removed. Note that:
*
* Note finally that:
*
* Each
* All node name and property name comparisons are case-sensitive.
*
*
* All of the methods that modify preference data are permitted to operate
* asynchronously; they may return immediately, and changes will eventually
* propagate to the persistent backing store, with an implementation-dependent
* delay. The
* Implementations must automatically attempt to flush to the backing store any
* pending updates for a bundle's preferences when the bundle is stopped or
* otherwise ungets the IPreferences Service.
*
*
* The methods in this class may be invoked concurrently by multiple threads in
* a single Java Virtual Machine (JVM) without the need for external
* synchronization, and the results will be equivalent to some serial execution.
* If this class is used concurrently by multiple JVMs that store their
* preference data in the same backing store, the data store will not be
* corrupted, but no other guarantees are made concerning the consistency of the
* preference data.
*
*
* @version $Revision$
*/
struct BERRY_RUNTIME IPreferences : virtual public Object
{
berryInterfaceMacro(IPreferences, berry)
+ virtual ~IPreferences();
+
/**
* Associates the specified value with the specified key in this node.
*
* @param key key with which the specified value is to be associated.
* @param value value to be associated with the specified key.
* @throws NullPointerException if
* Implementor's note: it is not necessary that the property value
* be represented by a
* Implementor's note: it is not necessary that the
* Implementor's note: it is not necessary that the value be
* represented by a string in the backing store. If the backing store
* supports
* Returns the specified default if there is no value associated with the
*
* Implementor's note: it is not necessary that the value be
* represented by a string in the backing store. If the backing store
* supports
* Implementor's note: it is not necessary that the value be
* represented by a string in the backing store. If the backing store
* supports
* Implementor's note: it is not necessary that the value be
* represented by a
* Returns the specified default if there is no value associated with the
*
* If the returned node did not exist prior to this call, this node and any
* ancestors that were created by this call are not guaranteed to become
* persistent until the
* If this node (or an ancestor) has already been removed with the
* {@link #removeNode()}method, it is legal to invoke this method,
* but only with the pathname
* The removal is not guaranteed to be persistent until the
* Once this method returns successfully, it is safe to assume that all
* changes made in the subtree rooted at this node prior to the method
* invocation have become permanent.
*
*
* Implementations are free to flush changes into the persistent store at
* any time. They do not need to wait for this method to be called.
*
*
* When a flush occurs on a newly created node, it is made persistent, as
* are any ancestors (and descendants) that have yet to be made persistent.
* Note however that any properties value changes in ancestors are not
* guaranteed to be made persistent.
*
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #sync()
*/
virtual void Flush() throw(Poco::Exception, BackingStoreException) = 0;
/**
* Ensures that future reads from this node and its descendants reflect any
* changes that were committed to the persistent store (from any VM) prior
* to the
* Note that these objects are only available to the main application
* (the plug-in that creates and owns the workbench).
*
* This interface is not intended to be implemented by clients.
*
* For a workbench retarget action
* ({@link org.blueberry.ui.actions.RetargetAction RetargetAction})
* to work, it must be registered.
* You should also register actions that will participate
* in custom key bindings.
*
* Note that these objects are only available to the main application
* (the plug-in that creates and owns the workbench).
*
* This interface is not intended to be implemented by clients.
*
* The initial value is
* The workbench remembers the given image descriptor under the given name,
* and makes the image available to plug-ins via
* {@link IWorkbench#GetSharedImages() IWorkbench.getSharedImages()}.
* For "shared" images, the workbench remembers the image descriptor and
* will manages the image object create from it; clients retrieve "shared"
* images via
* {@link org.blueberry.ui.ISharedImages#getImage ISharedImages.getImage()}.
* For the other, "non-shared" images, the workbench remembers only the
* image descriptor; clients retrieve the image descriptor via
* {@link org.blueberry.ui.ISharedImages#getImageDescriptor
* ISharedImages.getImageDescriptor()} and are entirely
* responsible for managing the image objects they create from it.
* (This is made confusing by the historical fact that the API interface
* is called "ISharedImages".)
*
* This is typically called from the advisor's
* This is typically called from the advisor's
* If
* If
* If the workbench is left running, it can be closed using
*
* The initial value is
* For more details, see
* %Window configurer objects are in 1-1 correspondence with the workbench
* windows they configure. Clients may use
* Note that these objects are only available to the main application
* (the plug-in that creates and owns the workbench).
*
* This interface is not intended to be implemented by clients.
*
* The initial value is
* The initial value is
* The initial value is
* The initial value is
* The initial value is
* For more details on the applicable shell style bits, see the
* documentation for Shell.
*
* The workbench advisor would ordinarily call this method from the
*
* Note that drag and drop to the editor area requires adding one or more
* transfer types (using
* The workbench advisor ordinarily calls this method from the
*
* Note that drag and drop to the editor area requires adding one or more
* transfer types (using
* This should only be called if the advisor is defining custom window contents
* in
* This should only be called if the advisor is defining custom window contents
* in
* This should only be called if the advisor is defining custom window contents
* in
* This should only be called if the advisor is defining custom window contents
* in
* An editor descriptor typically represents one of three types of editors:
*
* This interface is not intended to be implemented or extended by clients.
*
* For internal editors, this is the extension id as defined in the workbench
* registry; for external editors, it is path and file name of the external
* program.
*
* Clients implementing this editor input interface must override
*
* Clients should extend this interface to declare new types of editor inputs.
*
* An editor input is passed to an editor via the
* Editor input must implement the
* Please note that it is important that the editor input be light weight.
* Within the workbench, the navigation history tends to hold on to editor
* inputs as a means of reconstructing the editor at a later time. The
* navigation history can hold on to quite a few inputs (i.e., the default is
* fifty). The actual data model should probably not be held in the input.
*
* This method is primarily used to determine if an editor input should
* appear in the "File Most Recently Used" menu. An editor input will appear
* in the list until the return value of
* Note: although a null return value has never been permitted from this
* method, there are many known buggy implementations that return null.
* Clients that need the image for an editor are advised to use
* IWorkbenchPart.getImage() instead of IEditorInput.getImageDescriptor(),
* or to recover from a null return value in a manner that records the ID of
* the problematic editor input. Implementors that have been returning null
* from this method should pick some other default return value (such as
* ImageDescriptor.getMissingImageDescriptor()).
*
* For instance, when the input is from a file, the return value would
* ordinarily be just the file name.
*
* @return the name string; never
* Implementations should inspect the given editor input first,
* and try to reject it early before calling
* An editor is document or input-centric. Each editor has an input, and only
* one editor can exist for each editor input within a page. This policy has
* been designed to simplify part management.
*
* An editor should be used in place of a view whenever more than one instance
* of a document type can exist.
*
* This interface may be implemented directly. For convenience, a base
* implementation is defined in
* An editor part is added to the workbench in two stages:
*
* All editor parts implement the
* The site can be
* This method is automatically called shortly after the part is instantiated.
* It marks the start of the part's lifecycle. The
* {@link IWorkbenchPart#dispose IWorkbenchPart.dispose} method will be called
* automically at the end of the lifecycle. Clients must not call this method.
*
* Implementors of this method must examine the editor input object type to
* determine if it is understood. If not, the implementor must throw
* a
* This interface is not intended to be implemented by clients.
*
* Unlike most of the other methods on this type, this method
* can trigger plug-in activation.
*
* The workbench exposes its implemention of editor part sites via this
* interface, which is not intended to be implemented or extended by clients.
*
* An action contributor is responsable for the creation of actions.
* By design, this contributor is used for one or more editors of the same type.
* Thus, the contributor returned by this method is not owned completely
* by the editor - it is shared.
*
* Registers a pop-up menu with the default id for extension. The default id
* is defined as the part id.
*
* By default, context menus include object contributions based on the
* editor input for the current editor. It is possible to override this
* behaviour by calling this method with
* For a detailed description of context menu registration see
* {@link IWorkbenchPartSite#registerContextMenu(MenuManager, ISelectionProvider)}
*
* Registers a pop-up menu with a particular id for extension. This method
* should only be called if the target part has more than one context menu
* to register.
*
* By default, context menus include object contributions based on the
* editor input for the current editor. It is possible to override this
* behaviour by calling this method with
* For a detailed description of context menu registration see
* {@link IWorkbenchPartSite#registerContextMenu(MenuManager, ISelectionProvider)}
*
* The name and extension can never empty or null. The name may contain
* the single wild card character (*) to indicate the editor applies to
* all files with the same extension (e.g. *.doc). The name can never
* embed the wild card character within itself (i.e. rep*)
*
* This interface is not intended to be implemented by clients.
*
* The image is obtained from the default editor. A default file image is
* returned if no default editor is available.
*
* This interface is not intended to be implemented by clients.
*
* Mementos were designed with the following requirements in mind:
*
* Mementos meet these requirements by providing support for storing a
* mapping of arbitrary string keys to primitive values, and by allowing
* mementos to have other mementos as children (arranged into a tree).
* A robust external storage format based on XML is used.
*
* The key for an attribute may be any alpha numeric value. However, the
* value of
* This interface is not intended to be implemented or extended by clients.
*
* The
* The
* This interface should be implemented by selection listeners
* that want to be notified when the selection becomes
* This service can be acquired from your service locator:
* std::string
object ("").
* Every other node has an arbitrary node name, specified at the time it is
* created. The only restrictions on this name are that it cannot be the empty
* string, and it cannot contain the slash character ('/').
*
* "/"
. Children of the
* root node have absolute path names of "/" +
<node name>
* . All other nodes have absolute path names of <parent's absolute
* path name> + "/" +
<node name> . Note that
* all absolute path names begin with the slash character.
*
*
*
*
*
*
*
* Preference
node has zero or more properties associated with
* it, where a property consists of a name and a value. The bundle writer is
* free to choose any appropriate names for properties. Their values can be of
* type std::string
,long
,int
,bool
,
* std::vector
,float
, or double
but they can
* always be accessed as if they were std::string
objects.
*
* flush
method may be used to synchronously force updates
* to the backing store.
*
* key
or value
is
* null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
*/
virtual void Put(std::string key, std::string value) = 0;
/**
* Returns the value associated with the specified key
in this
* node. Returns the specified default if there is no value associated with
* the key
, or the backing store is inaccessible.
*
* @param key key whose associated value is to be returned.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the backing store is
* inaccessible.
* @return the value associated with key
, or def
if
* no value is associated with key
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @throws NullPointerException if key
is null
. (A
* null
default is permitted.)
*/
virtual std::string Get(std::string key, std::string def) const = 0;
/**
* Removes the value associated with the specified key
in this
* node, if any.
*
* @param key key whose mapping is to be removed from this node.
* @see #get(std::string,std::string)
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
*/
virtual void Remove(std::string key) = 0;
/**
* Removes all of the properties (key-value associations) in this node. This
* call has no effect on any descendants of this node.
*
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #remove(std::string)
*/
virtual void Clear() throw(Poco::Exception, BackingStoreException) = 0;
/**
* Associates a std::string
object representing the specified
* int
value with the specified key
in this node. The
* associated string is the one that would be returned if the int
* value were passed to Integer.toString(int)
. This method is
* intended for use in conjunction with {@link #getInt}method.
*
* std::string
object in the backing store. If the
* backing store supports integer values, it is not unreasonable to use
* them. This implementation detail is not visible through the
* IPreferences
API, which allows the value to be read as an
* int
(with getInt
or a std::string
(with
* get
) type.
*
* @param key key with which the string form of value is to be associated.
* @param value value
whose string form is to be associated with
* key
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getInt(std::string,int)
*/
virtual void PutInt(std::string key, int value) = 0;
/**
* Returns the int
value represented by the std::string
* object associated with the specified key
in this node. The
* std::string
object is converted to an int
as by
* Integer.parseInt(std::string)
. Returns the specified default if
* there is no value associated with the key
, the backing store
* is inaccessible, or if Integer.parseInt(std::string)
would throw a
* NumberFormatException
if the associated value
were
* passed. This method is intended for use in conjunction with the
* {@link #putInt}method.
*
* @param key key whose associated value is to be returned as an
* int
.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as an int
or the backing store is
* inaccessible.
* @return the int
value represented by the std::string
* object associated with key
in this node, or
* def
if the associated value does not exist or cannot
* be interpreted as an int
type.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #putInt(std::string,int)
* @see #get(std::string,std::string)
*/
virtual int GetInt(std::string key, int def) const = 0;
/**
* Associates a std::string
object representing the specified
* long
value with the specified key
in this node. The
* associated std::string
object is the one that would be returned if
* the long
value were passed to Long.toString(long)
.
* This method is intended for use in conjunction with the {@link #getLong}
* method.
*
* value
* be represented by a std::string
type in the backing store. If the
* backing store supports long
values, it is not unreasonable to
* use them. This implementation detail is not visible through the
* IPreferences
API, which allows the value to be read as a
* long
(with getLong
or a std::string
(with
* get
) type.
*
* @param key key
with which the string form of value
* is to be associated.
* @param value value
whose string form is to be associated with
* key
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getLong(std::string,long)
*/
virtual void PutLong(std::string key, long value) = 0;
/**
* Returns the long
value represented by the std::string
* object associated with the specified key
in this node. The
* std::string
object is converted to a long
as by
* Long.parseLong(std::string)
. Returns the specified default if
* there is no value associated with the key
, the backing store
* is inaccessible, or if Long.parseLong(std::string)
would throw a
* NumberFormatException
if the associated value
were
* passed. This method is intended for use in conjunction with the
* {@link #putLong}method.
*
* @param key key
whose associated value is to be returned as a
* long
value.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as a long
type or the backing
* store is inaccessible.
* @return the long
value represented by the std::string
* object associated with key
in this node, or
* def
if the associated value does not exist or cannot
* be interpreted as a long
type.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #putLong(std::string,long)
* @see #get(std::string,std::string)
*/
virtual long GetLong(std::string key, long def) const = 0;
/**
* Associates a std::string
object representing the specified
* bool
value with the specified key in this node. The
* associated string is "true" if the value is true
, and "false"
* if it is false
. This method is intended for use in
* conjunction with the {@link #getBool}method.
*
* bool
values, it is not unreasonable to use them.
* This implementation detail is not visible through the IPreferences
*
API, which allows the value to be read as a bool
* (with getBool
) or a std::string
(with get
)
* type.
*
* @param key key
with which the string form of value is to be
* associated.
* @param value value whose string form is to be associated with
* key
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getBool(std::string,bool)
* @see #get(std::string,std::string)
*/
virtual void PutBool(std::string key, bool value) = 0;
/**
* Returns the bool
value represented by the std::string
* object associated with the specified key
in this node. Valid
* strings are "true", which represents true
, and "false", which
* represents false
. Case is ignored, so, for example, "TRUE"
* and "False" are also valid. This method is intended for use in
* conjunction with the {@link #putBool}method.
*
* key
, the backing store is inaccessible, or if the associated
* value is something other than "true" or "false", ignoring case.
*
* @param key key
whose associated value is to be returned as a
* bool
.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as a bool
or the backing store
* is inaccessible.
* @return the bool
value represented by the std::string
* object associated with key
in this node, or
* null
if the associated value does not exist or cannot
* be interpreted as a bool
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #get(std::string,std::string)
* @see #putBool(std::string,bool)
*/
virtual bool GetBool(std::string key, bool def) const = 0;
/**
* Associates a std::string
object representing the specified
* float
value with the specified key
in this node.
* The associated std::string
object is the one that would be returned
* if the float
value were passed to
* Float.toString(float)
. This method is intended for use in
* conjunction with the {@link #getFloat}method.
*
* float
values, it is not unreasonable to use them.
* This implementation detail is not visible through the IPreferences
*
API, which allows the value to be read as a float
(with
* getFloat
) or a std::string
(with get
) type.
*
* @param key key
with which the string form of value is to be
* associated.
* @param value value whose string form is to be associated with
* key
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getFloat(std::string,float)
*/
virtual void PutFloat(std::string key, float value) = 0;
/**
* Returns the float value
represented by the std::string
* object associated with the specified key
in this node. The
* std::string
object is converted to a float
value as by
* Float.parseFloat(std::string)
. Returns the specified default if
* there is no value associated with the key
, the backing store
* is inaccessible, or if Float.parseFloat(std::string)
would throw a
* NumberFormatException
if the associated value were passed.
* This method is intended for use in conjunction with the {@link #putFloat}
* method.
*
* @param key key
whose associated value is to be returned as a
* float
value.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as a float
type or the backing
* store is inaccessible.
* @return the float
value represented by the string associated
* with key
in this node, or def
if the
* associated value does not exist or cannot be interpreted as a
* float
type.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @throws NullPointerException if key
is null
.
* @see #putFloat(std::string,float)
* @see #get(std::string,std::string)
*/
virtual float GetFloat(std::string key, float def) const = 0;
/**
* Associates a std::string
object representing the specified
* double
value with the specified key
in this node.
* The associated std::string
object is the one that would be returned
* if the double
value were passed to
* Double.toString(double)
. This method is intended for use in
* conjunction with the {@link #getDouble}method
*
* double
values, it is not unreasonable to use them.
* This implementation detail is not visible through the IPreferences
*
API, which allows the value to be read as a double
(with
* getDouble
) or a std::string
(with get
)
* type.
*
* @param key key
with which the string form of value is to be
* associated.
* @param value value whose string form is to be associated with
* key
.
* @throws NullPointerException if key
is null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getDouble(std::string,double)
*/
virtual void PutDouble(std::string key, double value) = 0;
/**
* Returns the double
value represented by the std::string
* object associated with the specified key
in this node. The
* std::string
object is converted to a double
value as by
* Double.parseDouble(std::string)
. Returns the specified default if
* there is no value associated with the key
, the backing store
* is inaccessible, or if Double.parseDouble(std::string)
would throw
* a NumberFormatException
if the associated value were passed.
* This method is intended for use in conjunction with the
* {@link #putDouble}method.
*
* @param key key
whose associated value is to be returned as a
* double
value.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as a double
type or the backing
* store is inaccessible.
* @return the double
value represented by the std::string
* object associated with key
in this node, or
* def
if the associated value does not exist or cannot
* be interpreted as a double
type.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the the {@link #removeNode()}method.
* @throws NullPointerException if key
is null
.
* @see #putDouble(std::string,double)
* @see #get(std::string,std::string)
*/
virtual double GetDouble(std::string key, double def) const = 0;
/**
* Associates a std::string
object representing the specified
* std::vector
with the specified key
in this node. The
* associated std::string
object the Base64 encoding of the
* std::vector
, as defined in RFC 2045 , Section 6.8,
* with one minor change: the string will consist solely of characters from
* the Base64 Alphabet ; it will not contain any newline characters.
* This method is intended for use in conjunction with the
* {@link #getByteArray}method.
*
* std::string
type in the backing store. If the
* backing store supports std::vector
values, it is not unreasonable
* to use them. This implementation detail is not visible through the
* IPreferences
API, which allows the value to be read as an a
* std::vector
object (with getByteArray
) or a
* std::string
object (with get
).
*
* @param key key
with which the string form of value
* is to be associated.
* @param value value
whose string form is to be associated with
* key
.
* @throws NullPointerException if key
or value
is
* null
.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #getByteArray(std::string,std::vectorstd::vector
value represented by the std::string
* object associated with the specified key
in this node. Valid
* std::string
objects are Base64 encoded binary data, as
* defined in RFC 2045 ,
* Section 6.8, with one minor change: the string must consist solely of
* characters from the Base64 Alphabet ; no newline characters or
* extraneous characters are permitted. This method is intended for use in
* conjunction with the {@link #putByteArray}method.
*
* key
, the backing store is inaccessible, or if the associated
* value is not a valid Base64 encoded byte array (as defined above).
*
* @param key key
whose associated value is to be returned as a
* std::vector
object.
* @param def the value to be returned in the event that this node has no
* value associated with key
or the associated value
* cannot be interpreted as a std::vector
type, or the backing
* store is inaccessible.
* @return the std::vector
value represented by the std::string
* object associated with key
in this node, or
* def
if the associated value does not exist or cannot
* be interpreted as a std::vector
.
* @throws NullPointerException if key
is null
. (A
* null
value for def
is permitted.)
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #get(std::string,std::string)
* @see #putByteArray(std::string,std::vectornull
!)
*
* @return an array of the keys that have an associated value in this node.
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
*/
virtual std::vectornull
!)
*
* @return the names of the children of this node.
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
*/
virtual std::vectornull
if this is the root.
*
* @return the parent of this node.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
*/
virtual IPreferences::Pointer Parent() const = 0;
/**
* Returns a named IPreferences
object (node), creating it and any
* of its ancestors if they do not already exist. Accepts a relative or
* absolute pathname. Absolute pathnames (which begin with '/'
)
* are interpreted relative to the root of this node. Relative pathnames
* (which begin with any character other than '/'
) are
* interpreted relative to this node itself. The empty string (""
)
* is a valid relative pathname, referring to this node itself.
*
* flush
method is called on the returned
* node (or one of its descendants).
*
* @param pathName the path name of the IPreferences
object to
* return.
* @return the specified IPreferences
object.
* @throws IllegalArgumentException if the path name is invalid.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @throws NullPointerException if path name is null
.
* @see #flush()
*/
virtual IPreferences::Pointer Node(std::string pathName) = 0;
/**
* Returns true if the named node exists. Accepts a relative or absolute
* pathname. Absolute pathnames (which begin with '/'
) are
* interpreted relative to the root of this node. Relative pathnames (which
* begin with any character other than '/'
) are interpreted
* relative to this node itself. The pathname ""
is valid, and
* refers to this node itself.
*
* ""
; the invocation will return
* false
. Thus, the idiom p.nodeExists("")
may be
* used to test whether p
has been removed.
*
* @param pathName the path name of the node whose existence is to be
* checked.
* @return true if the specified node exists.
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method and
* pathname
is not the empty string (""
).
* @throws IllegalArgumentException if the path name is invalid (i.e., it
* contains multiple consecutive slash characters, or ends with a
* slash character and is more than one character long).
*/
virtual bool NodeExists(std::string pathName) const
throw(Poco::Exception, BackingStoreException) = 0;
/**
* Removes this node and all of its descendants, invalidating any properties
* contained in the removed nodes. Once a node has been removed, attempting
* any method other than name()
,absolutePath()
or
* nodeExists("")
on the corresponding IPreferences
* instance will fail with an IllegalStateException
. (The
* methods defined on Object
can still be invoked on a node after
* it has been removed; they will not throw IllegalStateException
.)
*
* flush
* method is called on the parent of this node.
*
* @throws IllegalStateException if this node (or an ancestor) has already
* been removed with the {@link #removeNode()}method.
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @see #flush()
*/
virtual void RemoveNode() throw(Poco::Exception, BackingStoreException) = 0;
/**
* Returns this node's name, relative to its parent.
*
* @return this node's name, relative to its parent.
*/
virtual std::string Name() const = 0;
/**
* Returns this node's absolute path name. Note that:
*
*
*
* @return this node's absolute path name.
*/
virtual std::string AbsolutePath() const = 0;
/**
* Forces any changes in the contents of this node and its descendants to
* the persistent store.
*
* "/"
.
* '/'
).
* "."
and ".."
have no
* special significance in path names.
* sync
invocation. As a side-effect, forces any changes
* in the contents of this node and its descendants to the persistent store,
* as if the flush
method had been invoked on this node.
*
* @throws BackingStoreException if this operation cannot be completed due
* to a failure in the backing store, or inability to communicate
* with it.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()}method.
* @see #flush()
*/
virtual void Sync() throw(Poco::Exception, BackingStoreException) = 0;
};
} // namespace berry
#endif /*BERRYIPREFERENCES_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.osgi/src/internal/.DS_Store b/BlueBerry/Bundles/org.blueberry.osgi/src/internal/.DS_Store
new file mode 100644
index 0000000000..5008ddfcf5
Binary files /dev/null and b/BlueBerry/Bundles/org.blueberry.osgi/src/internal/.DS_Store differ
diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt/files.cmake b/BlueBerry/Bundles/org.blueberry.ui.qt/files.cmake
index 8cfc15cbac..72f1b63a50 100644
--- a/BlueBerry/Bundles/org.blueberry.ui.qt/files.cmake
+++ b/BlueBerry/Bundles/org.blueberry.ui.qt/files.cmake
@@ -1,114 +1,118 @@
set(SRC_CPP_FILES
berryIQtPreferencePage.cpp
berryIQtStyleManager.cpp
berryQCHPluginListener.cpp
berryQtAssistantUtil.cpp
berryQModelIndexObject.cpp
berryQtEditorPart.cpp
berryQtItemSelection.cpp
berryQtIntroPart.cpp
berryQtPreferences.cpp
berryQtSelectionProvider.cpp
berryQtViewPart.cpp
# application
application/berryQtWorkbenchAdvisor.cpp
)
set(INTERNAL_CPP_FILES
defaultpresentation/berryEmptyTabFolder.cpp
defaultpresentation/berryEmptyTabItem.cpp
defaultpresentation/berryNativeTabFolder.cpp
defaultpresentation/berryNativeTabItem.cpp
defaultpresentation/berryQCTabBar.cpp
defaultpresentation/berryQtWorkbenchPresentationFactory.cpp
util/berryAbstractTabFolder.cpp
+ util/berryAbstractTabItem.cpp
+ util/berryIPresentablePartList.cpp
util/berryLeftToRightTabOrder.cpp
util/berryPartInfo.cpp
util/berryPresentablePartFolder.cpp
util/berryReplaceDragHandler.cpp
util/berryTabbedStackPresentation.cpp
+ util/berryTabDragHandler.cpp
util/berryTabFolderEvent.cpp
+ util/berryTabOrder.cpp
berryQtDisplay.cpp
berryQtDnDTweaklet.cpp
berryQtFileImageDescriptor.cpp
berryQtGlobalEventFilter.cpp
berryQtIconImageDescriptor.cpp
berryQtImageTweaklet.cpp
berryQtMainWindowControl.cpp
berryQtMessageDialogTweaklet.cpp
berryQtMissingImageDescriptor.cpp
berryQtOpenPerspectiveAction.cpp
berryQtPerspectiveSwitcher.cpp
berryQtPluginActivator.cpp
berryQtSafeApplication.cpp
berryQtSash.cpp
berryQtShell.cpp
berryQtShowViewAction.cpp
berryQtShowViewDialog.cpp
berryQtStyleManager.cpp
berryQtStylePreferencePage.cpp
berryQtTracker.cpp
berryQtWidgetsTweaklet.cpp
berryQtWidgetsTweakletImpl.cpp
berryQtWorkbenchPageTweaklet.cpp
berryQtWorkbenchTweaklet.cpp
berryQtWorkbenchWindow.cpp
)
set(MOC_H_FILES
src/berryQCHPluginListener.h
src/berryQtSelectionProvider.h
src/internal/defaultpresentation/berryNativeTabFolder.h
src/internal/defaultpresentation/berryNativeTabItem.h
src/internal/defaultpresentation/berryQCTabBar.h
src/internal/defaultpresentation/berryQtWorkbenchPresentationFactory.h
src/internal/berryQtDisplay.h
src/internal/berryQtDnDTweaklet.h
src/internal/berryQtGlobalEventFilter.h
src/internal/berryQtImageTweaklet.h
src/internal/berryQtMainWindowControl.h
src/internal/berryQtMessageDialogTweaklet.h
src/internal/berryQtOpenPerspectiveAction.h
src/internal/berryQtPerspectiveSwitcher.h
src/internal/berryQtSash.h
src/internal/berryQtShowViewAction.h
src/internal/berryQtStyleManager.h
src/internal/berryQtStylePreferencePage.h
src/internal/berryQtTracker.h
src/internal/berryQtWidgetsTweaklet.h
src/internal/berryQtWidgetsTweakletImpl.h
src/internal/berryQtWorkbenchTweaklet.h
src/internal/berryQtWorkbenchPageTweaklet.h
src/internal/berryQtPluginActivator.h
)
set(UI_FILES
src/internal/berryQtShowViewDialog.ui
src/internal/berryQtStylePreferencePage.ui
src/internal/berryQtStatusPart.ui
)
set(QRC_FILES
resources/org_blueberry_ui_qt.qrc
)
set(CACHED_RESOURCE_FILES
plugin.xml
)
set(CPP_FILES )
foreach(file ${SRC_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/${file})
endforeach(file ${SRC_CPP_FILES})
foreach(file ${INTERNAL_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/internal/${file})
endforeach(file ${INTERNAL_CPP_FILES})
diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.cpp b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.cpp
new file mode 100644
index 0000000000..7492fda906
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryAbstractTabItem.h"
+
+namespace berry
+{
+
+AbstractTabItem::~AbstractTabItem()
+{
+}
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.h b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.h
index 2a327131df..d42d4b2082 100755
--- a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.h
+++ b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/util/berryAbstractTabItem.h
@@ -1,49 +1,49 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYABSTRACTTABITEM_H_
#define BERRYABSTRACTTABITEM_H_
#include false
.
* true
to save and restore workbench state, or
* false
to forget current workbench state on close.
*/
virtual bool GetSaveAndRestore() = 0;
/**
* Sets whether the workbench state should be saved on close and
* restored on subsequent open.
*
* @param enabled true
to save and restore workbench state, or
* false
to forget current workbench state on close.
*/
virtual void SetSaveAndRestore(bool enabled) = 0;
/**
* Restores a workbench window from the given memento.
*
* @param memento the memento from which to restore the window's state
* @return the configurer for the restored window
* @throws WorkbenchException if an error occurred during the restore
* @see IWorkbenchWindowConfigurer#SaveState(IMemento::Pointer)
*/
virtual IWorkbenchWindowConfigurer::Pointer RestoreWorkbenchWindow(IMemento::Pointer memento) = 0;
/*
* Declares a workbench image.
* true
if this is a shared image, and
* false
if this is not a shared image
* @see org.blueberry.ui.ISharedImages#getImage
* @see org.blueberry.ui.ISharedImages#getImageDescriptor
*/
// virtual void declareImage(String symbolicName, ImageDescriptor descriptor,
// boolean shared);
/**
* Forces the workbench to close due to an emergency. This method should
* only be called when the workbench is in dire straights and cannot
* continue, and cannot even risk a normal workbench close (think "out of
* memory" or "unable to create shell"). When this method is called, an
* abbreviated workbench shutdown sequence is performed (less critical
* steps may be skipped). The workbench advisor is still called; however,
* it must not attempt to communicate with the user. While an emergency
* close is in progress, EmergencyClosing()
returns
* true
. %Workbench advisor methods should always check this
* flag before communicating with the user.
*
* @see #EmergencyClosing()
*/
virtual void EmergencyClose() = 0;
/**
* Returns whether the workbench is being closed due to an emergency.
* When this method returns true
, the workbench is in dire
* straights and cannot continue. Indeed, things are so bad that we cannot
* even risk a normal workbench close. %Workbench advisor methods should
* always check this flag before attempting to communicate with the user.
*
* @return true
if the workbench is in the process of being
* closed under emergency conditions, and false
otherwise
*/
virtual bool EmergencyClosing() = 0;
/**
* Returns an object that can be used to configure the given window.
*
* @param window a workbench window
* @return a workbench window configurer
*/
virtual IWorkbenchWindowConfigurer::Pointer GetWindowConfigurer(
IWorkbenchWindow::Pointer window) = 0;
/**
* Returns the data associated with the workbench at the given key.
*
* @param key the key
* @return the data, or null
if there is no data at the given
* key
*/
virtual Object::Pointer GetData(const std::string& key) const = 0;
/**
* Sets the data associated with the workbench at the given key.
*
* @param key the key
* @param data the data, or null
to delete existing data
*/
virtual void SetData(const std::string& key, Object::Pointer data) = 0;
/**
* Restores the workbench state saved from the previous session, if any.
* This includes any open windows and their open perspectives, open views
* and editors, layout information, and any customizations to the open
* perspectives.
* WorkbenchAdvisor#OpenWindows()
* method.
* WorkbenchAdvisor#OpenWindows()
* method.
* true
if the workbench should exit when the last
* window is closed, false
if the window should just be
* closed, leaving the workbench (and its event loop) running.
* true
, the last window's state is saved before closing,
* so that it will be restored in the next session. This applies only if
* #GetSaveAndRestore()
returns true
).
* false
, the window is simply closed, losing its state.
* IWorkbench#Close()
, or a new window can be opened using
* IWorkbench#OpenWorkbenchWindow(const std::string&, IAdaptable*)
.
* true
.
* true
if the workbench will exit when the last
* window is closed, false
if the window should just
* be closed
*/
virtual bool GetExitOnLastWindowClose() = 0;
/**
* Sets whether the workbench should exit when the last window is closed, or
* whether the window should just be closed, leaving the workbench (and its
* event loop) running.
* #GetExitOnLastWindowClose()
.
* true
if the workbench should exit when the last
* window is closed, false
if the window should
* just be closed
*/
virtual void SetExitOnLastWindowClose(bool enabled) = 0;
};
}
#endif /*BERRYIWORKBENCHCONFIGURER_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.cpp
new file mode 100644
index 0000000000..87bdca6a95
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIWorkbenchWindowConfigurer.h"
+
+
+namespace berry {
+
+IWorkbenchWindowConfigurer::~IWorkbenchWindowConfigurer ()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.h b/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.h
index dbed6b2637..48abdb9bfd 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/application/berryIWorkbenchWindowConfigurer.h
@@ -1,374 +1,376 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIWORKBENCHWINDOWCONFIGURER_H_
#define BERRYIWORKBENCHWINDOWCONFIGURER_H_
#include Get/SetData
to
* associate arbitrary state with the window configurer object.
* true
.
* true
for a menu bar, and false
* for no menu bar
*/
virtual bool GetShowMenuBar() = 0;
/**
* Sets whether the underlying workbench window has a menu bar.
*
* @param show true
for a menu bar, and false
* for no menu bar
*/
virtual void SetShowMenuBar(bool show) = 0;
/**
* Returns whether the underlying workbench window has a cool bar.
* true
.
* true
for a cool bar, and false
* for no cool bar
*/
virtual bool GetShowCoolBar() = 0;
/**
* Sets whether the underlying workbench window has a cool bar.
*
* @param show true
for a cool bar, and false
* for no cool bar
*/
virtual void SetShowCoolBar(bool show) = 0;
/**
* Returns whether the underlying workbench window has a status line.
* true
.
* true
for a status line, and false
* for no status line
*/
virtual bool GetShowStatusLine() = 0;
/**
* Sets whether the underlying workbench window has a status line.
*
* @param show true
for a status line, and false
* for no status line
*/
virtual void SetShowStatusLine(bool show) = 0;
/**
* Returns whether the underlying workbench window has a perspective bar (the
* perspective bar provides buttons to quickly switch between perspectives).
* false
.
* true
for a perspective bar, and false
* for no perspective bar
*/
virtual bool GetShowPerspectiveBar() = 0;
/**
* Sets whether the underlying workbench window has a perspective bar (the
* perspective bar provides buttons to quickly switch between perspectives).
*
* @param show true
for a perspective bar, and
* false
for no perspective bar
*/
virtual void SetShowPerspectiveBar(bool show) = 0;
/**
* Returns whether the underlying workbench window has a progress indicator.
* false
.
* true
for a progress indicator, and false
* for no progress indicator
*/
virtual bool GetShowProgressIndicator() = 0;
/**
* Sets whether the underlying workbench window has a progress indicator.
*
* @param show true
for a progress indicator, and false
* for no progress indicator
*/
virtual void SetShowProgressIndicator(bool show) = 0;
/**
* Returns the style bits to use for the window's shell when it is created.
* The default is SWT.SHELL_TRIM
.
*
* @return the shell style bits
*/
virtual int GetShellStyle() = 0;
/**
* Sets the style bits to use for the window's shell when it is created.
* This method has no effect after the shell is created.
* That is, it must be called within the WorkbenchAdvisor#PreWindowOpen()
* callback.
* WorkbenchAdvisor#PreWindowOpen()
* callback.
*
* @param initialSize the initial size to use for the shell
*/
virtual void SetInitialSize(Point initialSize) = 0;
/*
* Returns the data associated with this workbench window at the given key.
*
* @param key the key
* @return the data, or null
if there is no data at the given
* key
*/
//virtual Object getData(String key);
/*
* Sets the data associated with this workbench window at the given key.
*
* @param key the key
* @param data the data, or null
to delete existing data
*/
//virtual void setData(String key, Object data);
/**
* Adds the given drag and drop Mime types to the ones
* supported for drag and drop on the editor area of this workbench window.
* PreWindowOpen
callback.
* A newly-created workbench window supports no drag and drop transfer
* types.
* AddEditorAreaTransfer
) and
* configuring a drop target listener
* (with ConfigureEditorAreaDropListener
)
* capable of handling any of those transfer types.
* PreWindowOpen
callback.
* A newly-created workbench window has no configured drop target listener for its
* editor area.
* AddEditorAreaTransfer
) and
* configuring a drop target listener
* (with ConfigureEditorAreaDropListener
)
* capable of handling any of those transfer types.
* createWindowContents
, and may only be called once.
* The caller must set it in the shell using Shell.setMenuBar(Menu)
* but must not make add, remove or change items in the result.
* The menu bar is populated by the window's menu manager.
* The application can add to the menu manager in the advisor's
* fillActionBars
method instead.
* createWindowContents
, and may only be called once.
* The caller must lay out the cool bar appropriately within the parent,
* but must not add, remove or change items in the result (hence the
* return type of Control
).
* The cool bar is populated by the window's cool bar manager.
* The application can add to the cool bar manager in the advisor's
* fillActionBars
method instead.
* createWindowContents
, and may only be called once.
* The caller must lay out the status line appropriately within the parent,
* but must not add, remove or change items in the result (hence the
* return type of Control
).
* The status line is populated by the window's status line manager.
* The application can add to the status line manager in the advisor's
* fillActionBars
method instead.
* WorkbenchWindowAdvisor#CreateWindowContents()
, and may only be called once.
* The caller must lay out the page composite appropriately within the parent,
* but must not add, remove or change items in the result.
* The page composite is populated by the workbench.
*
*
* true
if editor is inside editor area, and
* false
otherwise
* @since 3.0
*/
virtual bool IsInternal() const = 0;
/**
* Returns whether this editor descriptor will open an external
* editor in-place inside the editor area.
*
* @return true
if editor is in-place, and false
* otherwise
* @since 3.0
*/
virtual bool IsOpenInPlace() const = 0;
/**
* Returns whether this editor descriptor will open an external editor
* in a new window outside the workbench.
*
* @return true
if editor is external, and false
* otherwise
* @since 3.0
*/
virtual bool IsOpenExternal() const = 0;
/**
* Returns the editor matching strategy object for editors
* represented by this editor descriptor, or null
* if there is no explicit matching strategy specified.
*
* @return the editor matching strategy, or null
if none
* @since 3.1
*/
virtual IEditorMatchingStrategy::Pointer GetEditorMatchingStrategy() = 0;
};
}
#endif /*BERRYIEDITORDESCRIPTOR_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.cpp
new file mode 100644
index 0000000000..9afc98c060
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIEditorInput.h"
+
+namespace berry {
+
+IEditorInput::~IEditorInput ()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.h
index 8d812f2b5f..2453e77e81 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorInput.h
@@ -1,141 +1,143 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIEDITORINPUT_H_
#define BERRYIEDITORINPUT_H_
#include IEditorInput
is a light weight descriptor of editor input,
* like a file name but more abstract. It is not a model. It is a description of
* the model source for an IEditorPart
.
* Object#operator==(const Object*)
to answer true
* for two inputs that are
* the same. The IWorbenchPage.openEditor
APIs are dependent on
* this to find an editor with the same input.
* IEditorPart.init
* method. Due to the wide range of valid editor inputs, it is not possible to
* define generic methods for getting and setting bytes.
* IAdaptable
interface;
* extensions are managed by the platform's adapter manager.
* exists
becomes
* false
or it drops off the bottom of the list.
*
* @return true
if the editor input exists;
* false
otherwise
*/
virtual bool Exists() const = 0;
/**
* Returns the image descriptor for this input.
*
* null
if
* there is no image.
*/
//virtual ImageDescriptor GetImageDescriptor() = 0;
/**
* Returns the name of this editor input for display purposes.
* null
;
*/
virtual std::string GetName() const = 0;
/**
* Returns an object that can be used to save the state of this editor
* input.
*
* @return the persistable element, or null
if this editor
* input cannot be persisted
*/
//virtual IPersistableElement GetPersistable() = 0;
/**
* Returns the tool tip text for this editor input. This text is used to
* differentiate between two input with the same name. For instance,
* MyClass.java in folder X and MyClass.java in folder Y. The format of the
* text varies between input types.
* null
.
*/
virtual std::string GetToolTipText() const = 0;
/**
* Returns true if two editor inputs are the same
*
*/
virtual bool operator==(const Object* o) const = 0;
};
}
#endif /*BERRYIEDITORINPUT_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.cpp
new file mode 100644
index 0000000000..24e7d1c048
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIEditorMatchingStrategy.h"
+
+
+namespace berry {
+
+IEditorMatchingStrategy::~IEditorMatchingStrategy()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.h
index fcd39d688f..d94ed9fc6f 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorMatchingStrategy.h
@@ -1,66 +1,66 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIEDITORMATCHINGSTRATEGY_H_
#define BERRYIEDITORMATCHINGSTRATEGY_H_
#include IEditorReference.getEditorInput()
,
* since that method may be expensive.
* true
if the editor matches the given editor input,
* false
if it does not match
*/
virtual bool Matches(IEditorReference::Pointer editorRef, IEditorInput::Pointer input) = 0;
};
}
Q_DECLARE_INTERFACE(berry::IEditorMatchingStrategy, "org.blueberry.IEditorMatchingStrategy")
#endif /*BERRYIEDITORMATCHINGSTRATEGY_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.cpp
new file mode 100644
index 0000000000..74b0f5bd5d
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIEditorPart.h"
+
+
+namespace berry {
+
+IEditorPart::~IEditorPart()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.h
index 61180111b2..04ced89282 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIEditorPart.h
@@ -1,132 +1,130 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIEDITORPART_H_
#define BERRYIEDITORPART_H_
#include "berryIWorkbenchPart.h"
#include "berryISaveablePart.h"
#include IEditorInput
. Modifications made
* in an editor part follow an open-save-close lifecycle model (in contrast
* to a view part, where modifications are saved to the workbench
* immediately).
* EditorPart
.
*
*
* IAdaptable
interface; extensions
* are managed by the platform's adapter manager.
* getEditorInput
.
*/
//static const int PROP_INPUT = IWorkbenchPartConstants.PROP_INPUT;
/**
* Returns the input for this editor. If this value changes the part must
* fire a property listener event with PROP_INPUT
.
*
* @return the editor input
*/
virtual SmartPointer(IEditorSite) getSite()
.
* null
while the editor is being initialized.
* After the initialization is complete, this value must be non-null
* for the remainder of the editor's life cycle.
* null
if the editor
* has not yet been initialized
*/
virtual SmartPointerPartInitException
* null
if the editor was not instantiated or
* it failed to be restored. Tries to restore the editor
* if restore
is true.
*/
virtual IEditorPart::Pointer GetEditor(bool restore) = 0;
/**
* Returns the editor input for the editor referenced by this object.
* null
if none exists
*/
//virtual IEditorActionBarContributor getActionBarContributor();
/**
* Returns the action bars for this part site. Editors of the same type (and
* in the same window) share the same action bars. Contributions to the
* action bars are done by the IEditorActionBarContributor
.
*
* @return the action bars
* @since 2.1
*/
//virtual IActionBars getActionBars();
/**
* includeEditorInput
* as false
. This might be desirable for editors that
* present a localized view of an editor input (e.g., a node in a model
* editor).
* null
.
* @param selectionProvider
* the selection provider; must not be null
.
* @param includeEditorInput
* Whether the editor input should be included when adding object
* contributions to this context menu.
* @see IWorkbenchPartSite#registerContextMenu(MenuManager,
* ISelectionProvider)
* @since 3.1
*/
// virtual void registerContextMenu(MenuManager menuManager,
// ISelectionProvider selectionProvider, boolean includeEditorInput);
/**
* includeEditorInput
* as false
. This might be desirable for editors that
* present a localized view of an editor input (e.g., a node in a model
* editor).
* null
.
* @param menuManager
* the menu manager; must not be null
.
* @param selectionProvider
* the selection provider; must not be null
.
* @param includeEditorInput
* Whether the editor input should be included when adding object
* contributions to this context menu.
* @see IWorkbenchPartSite#registerContextMenu(MenuManager,
* ISelectionProvider)
* @since 3.1
*/
// virtual void registerContextMenu(String menuId, MenuManager menuManager,
// ISelectionProvider selectionProvider, boolean includeEditorInput);
};
}
#endif /*BERRYIEDITORSITE_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.cpp
new file mode 100644
index 0000000000..045c0e2785
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIFileEditorMapping.h"
+
+namespace berry
+{
+
+IFileEditorMapping::~IFileEditorMapping()
+{
+}
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.h
index c504a350c7..bd55734c35 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIFileEditorMapping.h
@@ -1,113 +1,113 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIFILEEDITORMAPPING_H_
#define BERRYIFILEEDITORMAPPING_H_
#include
namespace berry {
/**
* \ingroup org_blueberry_ui
*
* An association between a file name/extension and a list of known editors for
* files of that type.
*
null
if there
* is no default editor registered. Will also return null
if
* the default editor exists but fails the Expressions check.
*/
virtual IEditorDescriptor::Pointer GetDefaultEditor() = 0;
/**
* Returns the list of editors registered for this type mapping.
*
* @return a possibly empty list of editors.
*/
virtual std::listIFolderLayout
is used to define the initial views within a folder.
* The folder itself is contained within an IPageLayout
.
* "org.blueberry.ui.views"
).
*
* @param viewId the view id
*/
virtual void AddView(const std::string& viewId) = 0;
};
}
#endif /*BERRYIFOLDERLAYOUT_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.cpp
index 9299dc0c16..7908c82f7f 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.cpp
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.cpp
@@ -1,23 +1,27 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryIMemento.h"
namespace berry {
const std::string IMemento::TAG_ID = "IMemento.internal.id";
+IMemento::~IMemento()
+{
+}
+
}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.h
index 93982de615..37c3fb6d68 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIMemento.h
@@ -1,253 +1,250 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIMEMENTO_H_
#define BERRYIMEMENTO_H_
#include
*
* TAG_ID
is reserved for internal use.
* "IMemento.internal.id"
).
*
* @see #getID()
*/
static const std::string TAG_ID; // = "IMemento.internal.id";
/**
* Creates a new child of this memento with the given type.
* GetChild
and GetChildren
methods
* are used to retrieve children of a given type.
* TAG_ID
) and can be retrieved using GetID
.
* GetChild
and GetChildren
methods
* are used to retrieve children of a given type.
* null
* if the memento has no Text node.
*/
virtual const std::string& GetTextData() const = 0;
/**
* Returns an array of all the attribute keys of the memento. This will not
* be null
. If there are no keys, an array of length zero will
* be returned.
* @return an array with all the attribute keys of the memento
*/
virtual std::vector""
if none
* @see #CreateChild(const std::string&, const std::string&)
*/
virtual std::string GetID() const = 0;
/**
* Sets the value of the given key to the given floating point number.
*
* @param key the key
* @param value the value
*/
virtual void PutFloat(const std::string& key, double value) = 0;
/**
* Sets the value of the given key to the given integer.
*
* @param key the key
* @param value the value
*/
virtual void PutInteger(const std::string& key, int value) = 0;
/**
* Copy the attributes and children from memento
* to the receiver.
*
* @param memento the IMemento to be copied.
*/
virtual void PutMemento(IMemento::Pointer memento) = 0;
/**
* Sets the value of the given key to the given const std::string&.
*
* @param key the key
* @param value the value
*/
virtual void PutString(const std::string& key, const std::string& value) = 0;
/**
* Sets the value of the given key to the given boolean value.
*
* @param key the key
* @param value the value
*/
virtual void PutBoolean(const std::string& key, bool value) = 0;
/**
* Sets the memento's Text node to contain the given data. Creates the Text node if
* none exists. If a Text node does exist, it's current contents are replaced.
* Each memento is allowed only one text node.
*
* @param data the data to be placed on the Text node
*/
virtual void PutTextData(const std::string& data) = 0;
- virtual ~IMemento()
- {
- }
- ;
+ virtual ~IMemento();
};
} // namespace berry
#endif /*BERRYIMEMENTO_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.cpp
new file mode 100644
index 0000000000..4c139c39cf
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryINullSelectionListener.h"
+
+
+namespace berry {
+
+INullSelectionListener::~INullSelectionListener()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.h
index 872e925fb6..6c3a05636b 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryINullSelectionListener.h
@@ -1,99 +1,101 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYINULLSELECTIONLISTENER_H_
#define BERRYINULLSELECTIONLISTENER_H_
#include "berryISelectionListener.h"
namespace berry
{
/**
* Interface for listening to null
selection changes.
* null
.
* It has no methods. It simply indicates the desire to receive
* null
selection events through the existing
* SelectionChanged()
method. Either the part or the
* selection may be null
.
*
* class MyClass {
*
* private:
* void HandleSelectionChanged(berry::IWorkbenchPart::Pointer part, berry::ISelection::ConstPointer selection)
* { // do something }
*
* berry::INullSelectionListener::Pointer m_SelectionListener;
*
* public:
* MyClass()
* : m_SelectionListener(new berry::NullSelectionChangedAdapter
*/
template
* IPageService service = (IPageService) getSite().getService(IPageService.class);
*
*
*
*
* Note: listeners should be removed when no longer necessary. If * not, they will be removed when the IServiceLocator used to acquire this * service is disposed. *
* * @param listener a page listener * @see #removePageListener(IPageListener) */ //virtual void AddPageListener(IPageListener listener); /** * Adds the given listener for a page's perspective lifecycle events. * Has no effect if an identical listener is already registered. ** Note: listeners should be removed when no longer necessary. If * not, they will be removed when the IServiceLocator used to acquire this * service is disposed. *
* * @param listener a perspective listener * @see #removePerspectiveListener(IPerspectiveListener) */ virtual void AddPerspectiveListener(IPerspectiveListener::Pointer listener) = 0; /** * Returns the active page. * * @return the active page, ornull
if no page is currently active
*/
virtual SmartPointer* This interface is not intended to be implemented by clients. *
* * @see IWorkbenchPage */ struct BERRY_UI IPartService { - virtual ~IPartService() {} + virtual ~IPartService(); /** * Adds the given observer for part lifecycle events. * Has no effect if an identical listener is already registered. ** Note: listeners should be removed when no longer necessary. If * not, they will be removed when the IServiceLocator used to acquire this * service is disposed. *
* * @param listener a part listener * @see #removePartListener(IPartListener) */ virtual void AddPartListener(IPartListener::Pointer listener) = 0; /** * Returns the active part. * * @return the active part, ornull
if no part is currently active
*/
virtual IWorkbenchPart::Pointer GetActivePart() = 0;
/**
* Returns the active part reference.
*
* @return the active part reference, or null
if no part
* is currently active
*/
virtual IWorkbenchPartReference::Pointer GetActivePartReference() = 0;
/**
* Removes the given part listener.
* Has no affect if an identical listener is not registered.
*
* @param listener a part listener
*/
virtual void RemovePartListener(IPartListener::Pointer listener) = 0;
};
} // namespace berry
#endif /*BERRYIPARTSERVICE_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.cpp
new file mode 100644
index 0000000000..fa8e6eb451
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIPathEditorInput.h"
+
+namespace berry
+{
+
+IPathEditorInput::~IPathEditorInput()
+{
+}
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.h
index 4d48f6fc8a..0ebbc60625 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPathEditorInput.h
@@ -1,63 +1,63 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIPATHEDITORINPUT_H_
#define BERRYIPATHEDITORINPUT_H_
#include "berryIEditorInput.h"
#include
* Clients implementing this editor input interface should override
* Object.equals(Object)
to answer true for two inputs
* that are the same. The IWorkbenchPage.openEditor
APIs
* are dependent on this to find an editor with the same input.
*
* Path-oriented editors should support this as a valid input type, and * can allow full read-write editing of its content. *
* All editor inputs must implement the IAdaptable
interface;
* extensions are managed by the platform's adapter manager.
*
IPerspectiveRegistry
.
* * A perspective is a template for view visibility, layout, and action visibility * within a workbench page. There are two types of perspective: a predefined * perspective and a custom perspective. *
"org.blueberry.ui.perspectives"
).
* The extension defines a id, label, and IPerspectiveFactory
.
* A perspective factory is used to define the initial layout for a page.
*
* Within a page the user can open any of the perspectives known
* to the workbench's perspective registry, typically by selecting one from the
* workbench's Open Perspective
menu. When selected, the views
* and actions within the active page rearrange to reflect the perspective.
*
* This interface is not intended to be implemented by clients. *
* @see IPerspectiveRegistry * @noimplement This interface is not intended to be implemented by clients. */ struct BERRY_UI IPerspectiveDescriptor : public Object { berryInterfaceMacro(IPerspectiveDescriptor, berry) - virtual ~IPerspectiveDescriptor() {} + virtual ~IPerspectiveDescriptor(); /** * Returns the description of this perspective. * This is the value of its"description"
attribute.
*
* @return the description
* @since 3.0
*/
virtual std::string GetDescription() const = 0;
/**
* Returns this perspective's id. For perspectives declared via an extension,
* this is the value of its "id"
attribute.
*
* @return the perspective id
*/
virtual std::string GetId() const = 0;
/**
* Returns the descriptor of the image to show for this perspective.
* If the extension for this perspective specifies an image, the descriptor
* for it is returned. Otherwise a default image is returned.
*
* @return the descriptor of the image to show for this perspective
*/
virtual ImageDescriptor::Pointer GetImageDescriptor() const = 0;
/**
* Returns this perspective's label. For perspectives declared via an extension,
* this is the value of its "label"
attribute.
*
* @return the label
*/
virtual std::string GetLabel() const = 0;
};
}
#endif /*BERRYIPERSPECTIVEDESCRIPTOR_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.cpp
new file mode 100644
index 0000000000..8f15f2fc2d
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIPerspectiveFactory.h"
+
+namespace berry {
+
+IPerspectiveFactory::~IPerspectiveFactory()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.h
index c1b29f3ed7..901aea322a 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPerspectiveFactory.h
@@ -1,109 +1,111 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIPERSPECTIVEFACTORY_H_
#define BERRYIPERSPECTIVEFACTORY_H_
#include
* When a new page is created in the workbench a perspective is used to define
* the initial page layout. If this is a predefined perspective (based on an extension to
* the workbench's perspective extension point) an IPerspectiveFactory
* is used to define the initial page layout.
*
* The factory for the perspective is created and passed an IPageLayout
* where views can be added. The default layout consists of the editor area with no
* additional views. Additional views are added to the layout using
* the editor area as the initial point of reference. The factory is used only briefly
* while a new page is created; then discarded.
*
* To define a perspective clients should implement this interface and
* include the name of their class in an extension to the workbench's perspective
* extension point (named "org.blueberry.ui.perspectives"
). For example,
* the plug-in's XML markup might contain:
*
* <extension point="org.blueberry.ui.perspectives"> * <perspective * id="com.example.plugin.perspective" * name="My Perspective" * class="namespaze::MyPerspective"> * </perspective> * </extension> **
* Example of populating a page with standard workbench views: *
* public: void CreateInitialLayout(IPageLayout layout) { * // Get the editor area. * std::string editorArea = layout->GetEditorArea(); * * // Top left: Resource Navigator view and Bookmarks view placeholder * IFolderLayout::Pointer topLeft = layout->CreateFolder("topLeft", IPageLayout::LEFT, 0.25f, * editorArea); * topLeft->AddView(IPageLayout::ID_RES_NAV); * topLeft->AddPlaceholder(IPageLayout::ID_BOOKMARKS); * * // Bottom left: Outline view and Property Sheet view * IFolderLayout::Pointer bottomLeft = layout->CreateFolder("bottomLeft", IPageLayout::BOTTOM, 0.50f, * "topLeft"); * bottomLeft->AddView(IPageLayout::ID_OUTLINE); * bottomLeft->AddView(IPageLayout::ID_PROP_SHEET); * * // Bottom right: Task List view * layout->AddView(IPageLayout::ID_TASK_LIST, IPageLayout::BOTTOM, 0.66f, editorArea); * } **
* Within the workbench a user may override the visible views, layout and * action sets of a predefined perspective to create a custom perspective. In such cases * the layout is persisted by the workbench and the factory is not used. *
*/ struct BERRY_UI IPerspectiveFactory : public Object { - berryInterfaceMacro(IPerspectiveFactory, berry); + berryInterfaceMacro(IPerspectiveFactory, berry) + + ~IPerspectiveFactory(); /** * Creates the initial layout for a page. *
* Implementors of this method may add additional views to a
* perspective. The perspective already contains an editor folder
* identified by the result of IPageLayout.getEditorArea()
.
* Additional views should be added to the layout using this value as
* the initial point of reference.
*
* This registry contains a descriptor for each perspectives in the workbench.
* It is initially populated with stock perspectives from the workbench's
* perspective extension point ("org.blueberry.ui.perspectives"
) and
* with custom perspectives defined by the user.
*
* This interface is not intended to be implemented by clients. *
* @see IWorkbench#getPerspectiveRegistry * @noimplement This interface is not intended to be implemented by clients. */ struct IPerspectiveRegistry { - virtual ~IPerspectiveRegistry() {} + virtual ~IPerspectiveRegistry(); /** * Clones an existing perspective. * * @param id the id for the cloned perspective, which must not already be used by * any registered perspective * @param label the label assigned to the cloned perspective * @param desc the perspective to clone * @return the cloned perspective descriptor * @throws IllegalArgumentException if there is already a perspective with the given id * * @since 3.0 */ virtual IPerspectiveDescriptor::Pointer ClonePerspective(const std::string& id, const std::string& label, IPerspectiveDescriptor::Pointer desc) = 0; /** * Deletes a perspective. Has no effect if the perspective is defined in an * extension. * * @param persp the perspective to delete * @since 3.2 */ virtual void DeletePerspective(IPerspectiveDescriptor::Pointer persp) = 0; /** * Finds and returns the registered perspective with the given perspective id. * * @param perspectiveId the perspective id * @return the perspective, ornull
if none
* @see IPerspectiveDescriptor#getId
*/
virtual IPerspectiveDescriptor::Pointer FindPerspectiveWithId(const std::string& perspectiveId) = 0;
/**
* Finds and returns the registered perspective with the given label.
*
* @param label the label
* @return the perspective, or null
if none
* @see IPerspectiveDescriptor#getLabel
*/
virtual IPerspectiveDescriptor::Pointer FindPerspectiveWithLabel(const std::string& label) = 0;
/**
* Returns the id of the default perspective for the workbench. This identifies one
* perspective extension within the workbench's perspective registry.
*
* Returns null
if there is no default perspective.
*
null
*/
virtual std::string GetDefaultPerspective() = 0;
/**
* Returns a list of the perspectives known to the workbench.
*
* @return a list of perspectives
*/
virtual std::vectornull
, the id must correspond to a perspective extension
* within the workbench's perspective registry.
*
* A null
id indicates no default perspective.
*
null
*/
virtual void SetDefaultPerspective(const std::string& id) = 0;
/**
* Reverts a perspective back to its original definition
* as specified in the plug-in manifest.
*
* @param perspToRevert the perspective to revert
*
* @since 3.0
*/
virtual void RevertPerspective(IPerspectiveDescriptor::Pointer perspToRevert) = 0;
};
}
#endif /*BERRYIPERSPECTIVEREGISTRY_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.cpp
new file mode 100644
index 0000000000..3b08a6cc4a
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.cpp
@@ -0,0 +1,26 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIPlaceholderFolderLayout.h"
+
+namespace berry
+{
+
+IPlaceholderFolderLayout::~IPlaceholderFolderLayout()
+{
+}
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.h
index f2b41a09c1..ecee818d7d 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPlaceholderFolderLayout.h
@@ -1,101 +1,101 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIPLACEHOLDERFOLDERLAYOUT_H_
#define BERRYIPLACEHOLDERFOLDERLAYOUT_H_
#include IPlaceholderFolderLayout
is used to define the initial
* view placeholders within a folder.
* The folder itself is contained within an IPageLayout
.
* * This interface is not intended to be implemented by clients. *
* * @see IPageLayout#createPlaceholderFolder * @since 2.0 * @noimplement This interface is not intended to be implemented by clients. */ struct BERRY_UI IPlaceholderFolderLayout : public Object { berryInterfaceMacro(IPlaceholderFolderLayout, berry) - virtual ~IPlaceholderFolderLayout() {} + virtual ~IPlaceholderFolderLayout(); /** * Adds a view placeholder to this folder. * A view placeholder is used to define the position of a view before the view * appears. Initially, it is invisible; however, if the user ever opens a view * whose compound id matches the placeholder, the view will appear at the same * location as the placeholder. * See the {@link IPageLayout} type documentation for more details about compound ids. * If the placeholder contains wildcards, it remains in the layout, otherwise * it is replaced by the view. * If the primary id of the placeholder has no wildcards, it must refer to a view * contributed to the workbench's view extension point * (named"org.blueberry.ui.views"
).
*
* @param viewId the compound view id (wildcards allowed)
*/
virtual void AddPlaceholder(const std::string& viewId) = 0;
/**
* Returns the property with the given id or null
. Folder
* properties are an extensible mechanism for perspective authors to
* customize the appearance of view stacks. The list of customizable
* properties is determined by the presentation factory.
*
* @param id
* Must not be null
.
* @return property value, or null
if the property is not
* set.
* @since 3.3
*/
virtual std::string GetProperty(const std::string& id) = 0;
/**
* Sets the given property to the given value. Folder properties are an
* extensible mechanism for perspective authors to customize the appearance
* of view stacks. The list of customizable properties is determined by the
* presentation factory.
*
* These folder properties are intended to be set during
* IPerspectiveFactory#createInitialLayout
. Any subsequent
* changes to property values after this method completes will not fire
* change notifications and will not be reflected in the presentation.
*
null
.
* @param value
* property value. null
will clear the property.
* @since 3.3
*/
virtual void SetProperty(const std::string& id, const std::string& value) = 0;
};
}
#endif /*BERRYIPLACEHOLDERFOLDERLAYOUT_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.cpp
new file mode 100644
index 0000000000..b38979b107
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIPostSelectionProvider.h"
+
+
+namespace berry {
+
+IPostSelectionProvider::~IPostSelectionProvider()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.h
index 8679ed9021..92c9017e15 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPostSelectionProvider.h
@@ -1,65 +1,67 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIPOSTSELECTIONPROVIDER_H_
#define BERRYIPOSTSELECTIONPROVIDER_H_
#include "berryISelectionProvider.h"
namespace berry
{
/**
* \ingroup org_blueberry_ui
*
* Selection provider extension interface to allow providers
* to notify about post selection changed events.
* A post selection changed event is equivalent to selection changed event
* if the selection change was triggered by the mouse, but it has a delay
* if the selection change is triggered by keyboard navigation.
*
* @see ISelectionProvider
*
* @since 3.0
*/
struct BERRY_UI IPostSelectionProvider : public ISelectionProvider {
- berryInterfaceMacro(IPostSelectionProvider, berry);
+ berryInterfaceMacro(IPostSelectionProvider, berry)
+
+ ~IPostSelectionProvider();
/**
* Adds a listener for post selection changes in this selection provider.
* Has no effect if an identical listener is already registered.
*
* @param listener a selection changed listener
*/
virtual void AddPostSelectionChangedListener(
ISelectionChangedListener::Pointer listener) = 0;
/**
* Removes the given listener for post selection changes from this selection
* provider.
* Has no affect if an identical listener is not registered.
*
* @param listener a selection changed listener
*/
virtual void RemovePostSelectionChangedListener(
ISelectionChangedListener::Pointer listener) = 0;
};
}
#endif /*BERRYIPOSTSELECTIONPROVIDER_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.cpp
new file mode 100644
index 0000000000..0cf5cf30c5
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIPreferencePage.h"
+
+
+namespace berry {
+
+IPreferencePage::~IPreferencePage()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.h
index fab0f85fd0..43b164425c 100644
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPreferencePage.h
@@ -1,107 +1,109 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYIPREFERENCEPAGE_H_
#define BERRYIPREFERENCEPAGE_H_
#include "berryObject.h"
#include "berryIPreferences.h"
#include "berryIWorkbench.h"
#include
* Clients should implement this interface and include the name of their class
* in an extension contributed to the workbench's preference extension point
* (named "org.blueberry.ui.preferencePages"
).
* For example, the plug-in's XML markup might contain:
*
* <extension point="org.blueberry.ui.preferencePages"> * <page id="com.example.myplugin.prefs" * name="Knobs" * class="ns::MyPreferencePage" /> * </extension> ** */ struct IPreferencePage: virtual public Object { berryInterfaceMacro(IPreferencePage, berry) + ~IPreferencePage(); + /** * Initializes this preference page for the given workbench. *
* This method is called automatically as the preference page is being created * and initialized. Clients must not call this method. *
* * @param workbench the workbench */ virtual void Init(IWorkbench::Pointer workbench) = 0; /** * Creates the top level control for this preference * page under the given parent widget. *
* Implementors are responsible for ensuring that
* the created control can be accessed via GetControl
*
* May return null
if the control
* has not been created yet.
*
null
*/
virtual void* GetControl() const = 0;
///
/// Invoked when the OK button was clicked in the preferences dialog
///
virtual bool PerformOk() = 0;
///
/// Invoked when the Cancel button was clicked in the preferences dialog
///
virtual void PerformCancel() = 0;
///
/// Invoked when the user performed an import. As the values of the preferences may have changed
/// you should read all values again from the preferences service.
///
virtual void Update() = 0;
};
}
Q_DECLARE_INTERFACE(berry::IPreferencePage, "org.blueberry.IPreferencePage")
#endif /*BERRYIPREFERENCEPAGE_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPropertyChangeListener.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPropertyChangeListener.cpp
index 07acd737da..5bcd1161ca 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIPropertyChangeListener.cpp
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIPropertyChangeListener.cpp
@@ -1,50 +1,54 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "berryIPropertyChangeListener.h"
#include "berryIWorkbenchPartConstants.h"
#include * Usage: *
* IPropertyChangeListener listener = * new IPropertyChangeListener() { * public void propertyChange(PropertyChangeEvent event) { * ... // code to deal with occurrence of property change * } * }; * emitter.addPropertyChangeListener(listener); * ... * emitter.removePropertyChangeListener(listener); ** */ struct BERRY_UI IPropertyChangeListener: public virtual Object { berryInterfaceMacro(IPropertyChangeListener, berry); - virtual ~IPropertyChangeListener() - { - } + virtual ~IPropertyChangeListener(); struct BERRY_UI Events { typedef Message1
* This method gets called when the observed object fires a property * change event. *
* * @param event the property change event object describing which property * changed and how */ virtual void PropertyChange(PropertyChangeEvent::Pointer event); virtual void PropertyChange(Object::Pointer /*source*/, int /*propId*/) {} }; templateNote: Clients must fire the {@link IEditorPart#PROP_INPUT }
* property change within their implementation of
* setInput()
.
*
* @param input the editor input
*/
virtual void SetInput(IEditorInput::Pointer input) = 0;
};
}
#endif /*BERRYIREUSABLEEDITOR_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.cpp
new file mode 100644
index 0000000000..cf7e6b695d
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryISaveablesSource.h"
+
+
+namespace berry {
+
+ISaveablesSource::~ISaveablesSource()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.h
index bd63bfc35f..1e280bac1b 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryISaveablesSource.h
@@ -1,122 +1,124 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYISAVEABLESSOURCE_H_
#define BERRYISAVEABLESSOURCE_H_
#include
* IMPORTANT: As of 3.2, implementers of ISaveablesSource
must
* satisfy the following conditions:
*
*
* If any of these conditions are not met, it is undefined whether the Workbench
* will prompt to save dirty Saveables when closing parts or the Workbench.
*
*
* ISaveablePart
true
from {@link ISaveablePart#isDirty()}true
from
* {@link ISaveablePart#isSaveOnCloseNeeded()} if it is dirty (the default
* behaviour implemented by {@link EditorPart})
*
* workbench.getService(ISaveablesLifecycleListener.class)
) must
* be notified of any change to the result of {@link #getSaveables()}
* These conditions may be relaxed in future releases. *
* * @since 3.2 */ struct BERRY_UI ISaveablesSource : public virtual Object { - berryInterfaceMacro(ISaveablesSource, berry); + berryInterfaceMacro(ISaveablesSource, berry) + + ~ISaveablesSource(); /** * Returns the saveables presented by the workbench part. If the return * value of this method changes during the lifetime of * this part (i.e. after initialization and control creation but before disposal) * the part must notify an implicit listener using * {@link ISaveablesLifecycleListener#handleLifecycleEvent(SaveablesLifecycleEvent)}. *
* Additions of saveables to the list of saveables of this part are
* announced using an event of type
* {@link SaveablesLifecycleEvent#POST_OPEN}. Removals are announced in a
* two-stage process, first using an event of type
* {@link SaveablesLifecycleEvent#PRE_CLOSE} followed by an event of type
* {@link SaveablesLifecycleEvent#POST_CLOSE}. Since firing the
* PRE_CLOSE
event may trigger prompts to save dirty
* saveables, the cancellation status of the event must be checked by the
* part after the notification. When removing only non-dirty saveables,
* POST_CLOSE
notification is sufficient.
*
* The listener is obtained from the part site by calling
* partSite.getService(ISaveablesLifecycleListener.class)
.
*
* The part must not notify from its initialization methods (e.g. init
* or createPartControl
), or from its dispose method. Parts that
* implement {@link IReusableEditor} must notify when their input is changed
* through {@link IReusableEditor#setInput(IEditorInput)}.
*
* Certain workbench actions, such as Save, target only the active saveables * in the active part. For example, the active saveables could be determined * based on the current selection in the part. *
* * @return the saveables currently active in the workbench part */ virtual std::vectortrue
if this selection is empty,
* and false
otherwise
*/
virtual bool IsEmpty() const = 0;
};
}
#endif /*BERRYISELECTION_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.cpp
new file mode 100644
index 0000000000..caa9ed7867
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryISelectionProvider.h"
+
+
+namespace berry {
+
+ISelectionProvider::~ISelectionProvider()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.h
index 85fe5a918a..dce3da6c98 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryISelectionProvider.h
@@ -1,75 +1,77 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYISELECTIONPROVIDER_H_
#define BERRYISELECTIONPROVIDER_H_
#include
* A listener that wants to be notified when the selection becomes
* null
must implement the INullSelectionListener
* interface.
*
* This interface is not intended to be implemented by clients. *
* @see org.blueberry.ui.ISelectionListener * @see org.blueberry.ui.INullSelectionListener */ struct BERRY_UI ISelectionService { struct SelectionEvents { typedef Message2
* When the part is created, the listener is passed the part's initial selection.
* When the part is disposed, the listener is passed a null
selection,
* but only if the listener implements INullSelectionListener
.
*
* Note: This will not correctly track editor parts as each editor does * not have a unique partId. *
* * @param partId the id of the part to track * @param listener a selection listener * @since 2.0 */ virtual void AddSelectionListener(const std::string& partId, ISelectionListener::Pointer listener) = 0; /** * Adds the given post selection listener.It is equivalent to selection * changed if the selection was triggered by the mouse but it has a * delay if the selection is triggered by the keyboard arrows. * Has no effect if an identical listener is already registered. * * Note: Works only for StructuredViewer(s). * * @param listener a selection listener */ virtual void AddPostSelectionListener(ISelectionListener::Pointer listener) = 0; /** * Adds a part-specific selection listener which is notified when selection changes * in the part with the given id. This is independent of part activation - the part * need not be active for notification to be sent. *
* When the part is created, the listener is passed the part's initial selection.
* When the part is disposed, the listener is passed a null
selection,
* but only if the listener implements INullSelectionListener
.
*
* Note: This will not correctly track editor parts as each editor does * not have a unique partId. *
* * @param partId the id of the part to track * @param listener a selection listener * @since 2.0 */ virtual void AddPostSelectionListener(const std::string& partId, ISelectionListener::Pointer listener) = 0; /** * Returns the current selection in the active part. If the selection in the * active part is undefined (the active part has no selection provider) * the result will benull
.
*
* @return the current selection, or null
if undefined
*/
virtual ISelection::ConstPointer GetSelection() const = 0;
/**
* Returns the current selection in the part with the given id. If the part is not open,
* or if the selection in the active part is undefined (the active part has no selection provider)
* the result will be null
.
*
* @param partId the id of the part
* @return the current selection, or null
if undefined
* @since 2.0
*/
virtual ISelection::ConstPointer GetSelection(const std::string& partId) = 0;
/**
* Removes the given selection listener.
* Has no effect if an identical listener is not registered.
*
* @param listener a selection listener
*/
virtual void RemoveSelectionListener(ISelectionListener::Pointer listener) = 0;
/**
* Removes the given part-specific selection listener.
* Has no effect if an identical listener is not registered for the given part id.
*
* @param partId the id of the part to track
* @param listener a selection listener
* @since 2.0
*/
virtual void RemoveSelectionListener(const std::string& partId,
ISelectionListener::Pointer listener) = 0;
/**
* Removes the given post selection listener.
* Has no effect if an identical listener is not registered.
*
* @param listener a selection listener
*/
virtual void RemovePostSelectionListener(ISelectionListener::Pointer listener) = 0;
/**
* Removes the given part-specific post selection listener.
* Has no effect if an identical listener is not registered for the given part id.
*
* @param partId the id of the part to track
* @param listener a selection listener
* @since 2.0
*/
virtual void RemovePostSelectionListener(const std::string& partId,
ISelectionListener::Pointer listener) = 0;
};
} // namespace berry
#endif /*BERRYISELECTIONSERVICE_H_*/
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.cpp
new file mode 100644
index 0000000000..a2917f01ec
--- /dev/null
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.cpp
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) German Cancer Research Center, Division of Medical and
+ Biological Informatics. All rights reserved.
+ See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
+
+#include "berryIShellProvider.h"
+
+
+namespace berry {
+
+IShellProvider::~IShellProvider()
+{
+}
+
+}
diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.h b/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.h
index 34768ac09c..f5f712d762 100755
--- a/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.h
+++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryIShellProvider.h
@@ -1,51 +1,53 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#ifndef BERRYISHELLPROVIDER_H_
#define BERRYISHELLPROVIDER_H_
#include