This page describes the contextmenus of projectExplorer and related Application menu-items. The usage should be intuitive, for reference the Windows File Explorer and also the Solution Explorer of Visual Studio are used.

See latest comments in the JIRA issue: http://issues/browse/TOOLS-1480

Selection is item selected in Gui. In case of contextmenu the node clicked on is automatically selected (cfr Solution Explorer of Visual Studio).

menu

visible

enabled

comments

<Project>

 

 

 

Add

 

 

 

  • New Data..

always

always

Will popup a select new dataitem form. After closing the form with OK button the dataitem will be added as child of the project in the project explorer. The dataitem will be selected and be in rename mode.
sort rules may apply.

  • New Model...

always

always

Will popup a select new model form. After closing the form with OK button the model will be added as child of the project in the project explorer. The model will be selected and be in rename mode.
sort rules may apply.

  • New Folder

always

always

Will add a folder. The folder will be selected and be in rename mode

Run All Models

always

when there are models and they the ActivityQueue is empty.

Will add all models in the project to the ActivityQueue. Currently models will be run sequential. If model run is completed it is removed from the ActivityQueue.

Import...

always

always

Will popup a select import form. Either data, model or project may be imported. After closing the form with OK button the object will be imported and added as child of the project in the project explorer.

Paste

always

if there is something to paste in clipboard.*

The pasted item will be added as child of the project in the project explorer.

Rename

always

always

Is same functionality as Save As in current project folder

Properties

always

always

Properties will be shown selection in PropertyGrid If PropertyGrid is not open it will be opened. If PropertyGrid is not visible (other toolwiondow on top) it will be made on top/visible.

*May be complicated to determine if clipboard can be pasted.

menu

visible

enabled

comments

<Folder>

 

 

 

  • New Data

always

always

see <project>; new object will be added as child of folder

  • New Model

always

always

see <project>; new object will be added as child of folder

  • New Folder

always

always

see <project>; new object will be added as child of folder

Run All Models

always

when there are models in folder (or subfolder) and the ActivityQueue is empty

see <project>;applied to models in folder

Export...

always

always (gray if it is empty?)

will export the folder and its contents as a project.

Import...

always

always

see <project>; new object will be added as child of folder

Cut

always

when there are no running models in folder

 

Copy

always

if selection can be copied

 

Paste

always

if there is something to paste in clipboard

see <project>; new object will be added as child of folder

Delete

always

when there are no running models in folder

 

Rename

always

when there are no running models in folder

 

Properties

always

always

see <Project>

menu

visible

enabled

comments

<Model>

 

 

 

Open

when there is a default viewer

always

Opens the default viewer; see discussion below

Open With...

when the number of viewers > 0

always

 

Run Model

always

when the model is not in the ActivityQueue (add some validation check?)

 

Stop Model

always

when the model is in the ActivityQueue

 

Cut

always

when the model is not in the ActivityQueue

 

Copy

always

when the model is not in the ActivityQueue

 

Delete

always

when the model is not in the ActivityQueue

 

Rename

always

when the model is not in the ActivityQueue

 

Properties

always

always

see <Project>;

menu

visible

enabled

comments

<Composite Model>

 

 

 

Open

when there is a default viewer

always

see <Model>;

Open With...

when the number of viewers > 0

always

 

Add New Model

always

when the model is not running

 

Run Model

always

when the composite model has more than 0 member models and composite model is not in the ActivityQueue (add some validation check?)

 

Stop Model

always

when the model is in the ActivityQueue

 

Cut

always

when the model is not in the ActivityQueue

 

Copy

always

when the model is not in the ActivityQueue

 

Delete

always

when the model is not in the ActivityQueue

 

Rename

always

when the model is not in the ActivityQueue

 

Properties

always

always

see <Project>;

for composite model restrictions for the running model are also valid if a member model is in the ActivityQueue.

menu

visible

enabled

comments

<DataItem>

 

 

 

Open

when there is a default viewer

always

see <Model>;

Open With...

when the number of viewers > 0

always

 

Import...

when there are importers

always

 

Export...

always

always

 

Cut

always

always

 

Copy

always

always

 

Delete

always

always

 

Rename

always

always

 

Unlink

always

when the dataitem is linked

 

Properties

always

always

see <Project>; 

When a dataitem is member of a model other rules may apply? If model is running disable rename, cut, delete, etc.

Clipboard functions

There are 2 variant for implementing the cut and copy clipboard functions

directly (used in notepad).

cut = Remove selection and add selection to clipboard

copy = add selection to clipboard

lazy (used in Windows File Explorer)

cut = mark selection and register item with clipboard

copy = register item with clipboard

pros of the lazy method

- is more convenient for the user when applied to a treeview because you can always see what you are doing.

- the first undo for the cut command has a trivial implementation; just unregister item with clipboard.

- less resources demanding; (large) items are not copied to clibboard

contras of the lazy method

- adds complexity to implementation; when an item is in cut state this should be visible to the user; gray treenode.

- when item is changed after copy but before paste the pasted item will differ from the copied item.

Discussions

DataItem and Model: Open - should open the default view. If the default view is already opened this view should be activated. To open a second view an new menuitem Open New View (with)... should be added.
DataItem: Import... should be Import into...
DataItem: Add Paste into...

How to support context menus from plugins.

Thirdparty nodepresenter is a mechanism build into the projectexplorer to add extra control for DataItem based
objects, e.g. regular grid coverage.

  • No labels