ignition.designer.model.DesignerContext

Hi,
Can you give me more information on this method.

addFolder void addFolder(long newResourceId, java.lang.String moduleId, int scope, java.lang.String folderName, java.util.UUID parent) Adds a new folder under the given parent. If there is already a child with the given name, the name will be automatically modified

I can get the newResourceId from the context.GetLockManager().newRessourceId().
I would like to know was is the moduleId and where it come from?
I would like to have more information on the scope and how do you select the proper scope for your application?
I would like to know where and how to you get the UUID of the parent node?

My goal is to add a folder in the project tree and open a workspace where I could enter a SQLtag path to be used by my gateway scope module.

thanks

Hi there. Bad news & good news.

The bad news is that you’re doing it all wrong.

The good news is that the right way to do it is pretty easy. In your Designer module hook, you want to add a new node to the nav tree.

  1. Create your workspace implementation, and register it using context.registerResourceWorkspace()
  2. Make your node by creating a subclass of AbstractNavTreeNode. Make sure to override getWorkspaceName() to return the name of your workspace (this is what will automatically switch to your workspace when the node is selected)
  3. Add your node using context.getProjectBrowserRoot().addChild()
1 Like

Hi Carl

  To creat a workspace do I need to extent a class from one of these abstract class?
  [ul]AbstractDesignableWorkspace
  DefaultDesignableWorkspace[/ul]

  Thanks

No, all you have to do is implement ResourceWorkspace.

AbstractDesignableWorkspace is useful for workspaces that need a drag-and-drop, WYSIWYG type interface.