Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 57002 Details for
Bug 167565
UCD: MRT: Create a link in the MRT view to launch code generation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Creates Code Generation Section in MRT Editor
Patch_167565.txt (text/plain), 5.95 KB, created by
Nalini V
on 2007-01-17 02:26:26 EST
(
hide
)
Description:
Creates Code Generation Section in MRT Editor
Filename:
MIME Type:
Creator:
Nalini V
Created:
2007-01-17 02:26:26 EST
Size:
5.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.wsdm.tooling.editor.mrt >Index: src/org/eclipse/tptp/wsdm/tooling/editor/mrt/internal/MrtPrototypeForm.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.editor.mrt/src/org/eclipse/tptp/wsdm/tooling/editor/mrt/internal/MrtPrototypeForm.java,v >retrieving revision 1.14 >diff -u -r1.14 MrtPrototypeForm.java >--- src/org/eclipse/tptp/wsdm/tooling/editor/mrt/internal/MrtPrototypeForm.java 15 Dec 2006 07:47:46 -0000 1.14 >+++ src/org/eclipse/tptp/wsdm/tooling/editor/mrt/internal/MrtPrototypeForm.java 17 Jan 2007 06:53:59 -0000 >@@ -65,7 +65,10 @@ > import org.eclipse.tptp.wsdm.tooling.validation.builders.internal.GatherErrors; > import org.eclipse.tptp.wsdm.tooling.validation.mrt.internal.MrtDefinitionValidator; > import org.eclipse.tptp.wsdm.tooling.wizard.capability.internal.NewCapabilityWizard; >+import org.eclipse.tptp.wsdm.tooling.wizard.mrt.internal.MRTCodeGenerationDelegate; >+import org.eclipse.tptp.wsdm.tooling.wizard.mrt.internal.NewProjectWizard; > import org.eclipse.tptp.wsdm.tooling.wizard.mrt.internal.WorkspaceCapSelector; >+import org.eclipse.ui.IFileEditorInput; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.PartInitException; > import org.eclipse.ui.PlatformUI; >@@ -148,6 +151,8 @@ > > private Composite _newCapabilitySection; > >+ private Composite _CodeGenerationSection; >+ > private Label _errorLabel; > > /** >@@ -352,17 +357,20 @@ > initMrtWidgets(); > // Initialice new capability related widgets > initNewCapWidgets(); >+ initCodeGenWidget(); > } > > /** > * Initialize all the sections. > */ > private void initSections() { >- _mrtSection = createSection(Messages.MEP_TYPE, ""); >+ _mrtSection = createSection(Messages.MEP_TYPE, "",1,2); > > _newCapabilitySection = createSection(Messages.NEW_CUSTOM_CAP, > Messages.NEW_CUSTOM_CAP_CREATE); > >+ _CodeGenerationSection = createSection(Messages.MRT_CODE_GEN,Messages.MRT_CODE_GEN_TEXT); >+ > } > > /** >@@ -520,6 +528,57 @@ > toolkit.paintBordersFor(_newCapabilitySection); > } > >+ private void initCodeGenWidget() { >+ GridLayout layout = new GridLayout(); >+ _CodeGenerationSection.setLayout(layout); >+ >+ FormToolkit toolkit = getToolkit(); >+ >+ // Composite to held link >+ Composite codeGenComposite = toolkit >+ .createComposite(_CodeGenerationSection); >+ layout = new GridLayout(); >+ codeGenComposite.setLayout(layout); >+ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); >+ gd.horizontalSpan = 1; >+ codeGenComposite.setLayoutData(gd); >+ >+ // Hyperlink group >+ Shell shell = getForm().getShell(); >+ HyperlinkGroup codeGenGroup = createHyperlinkGroup(shell); >+ >+ // Create listener to handle code generation link >+ IHyperlinkListener codeGenLinkListener = new IHyperlinkListener() { >+ public void linkEntered(HyperlinkEvent event) { >+ } >+ >+ public void linkExited(HyperlinkEvent event) { >+ } >+ >+ public void linkActivated(HyperlinkEvent event) { >+ IFile mrtFile = ((IFileEditorInput) _editor.getEditorInput()).getFile(); >+ MRTCodeGenerationDelegate mrtCodeGen = new MRTCodeGenerationDelegate(mrtFile); >+ NewProjectWizard newprjw = new NewProjectWizard(mrtCodeGen); >+ WizardDialog wd = new WizardDialog(getForm().getShell(), newprjw); >+ wd.create(); >+ newprjw.setWindowTitle(Messages.NEW_CUSTOM_CAP); >+ newprjw.addPages(); >+ wd.open(); >+ } >+ }; >+ >+ // Create Code Generation Link >+ Image capEditorImage = EclipseUtils.loadImage(getForm().getShell() >+ .getDisplay(), "icons/capability.gif"); >+ Hyperlink codeGenLink = createLink(codeGenComposite, >+ "Code Generation", codeGenLinkListener, >+ capEditorImage); >+ codeGenGroup.add(codeGenLink); >+ >+ toolkit.paintBordersFor(_CodeGenerationSection); >+ >+ } >+ > // Method to create hyperlinkgroup > private HyperlinkGroup createHyperlinkGroup(Shell shell) { > HyperlinkGroup group = new HyperlinkGroup(shell.getDisplay()); >#P org.eclipse.tptp.wsdm.tooling.validation >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.validation/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java,v >retrieving revision 1.7 >diff -u -r1.7 Messages.java >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 9 Jan 2007 19:52:25 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 17 Jan 2007 06:54:01 -0000 >@@ -119,7 +119,9 @@ > public static String MRT_ERROR_CANNOT_LOAD_RES; > public static String MRT_ERROR_CANNOT_SERIALIZE; > public static String MRT_MAY_NOT_WORK_WITH_MAX; >- >+ public static String MRT_CODE_GEN; >+ public static String MRT_CODE_GEN_TEXT; >+ > static { > NLS.initializeMessages(BUNDLE_NAME, Messages.class); > } >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.validation/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties,v >retrieving revision 1.7 >diff -u -r1.7 messages.properties >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 9 Jan 2007 19:52:25 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 17 Jan 2007 06:54:02 -0000 >@@ -110,3 +110,6 @@ > MRT_ERROR_CANNOT_SERIALIZE = IWAT0674E Could not serialize Manageable Resource Type ! > PROJECT_EXISTS_WARNING = The project already exists > MRT_MAY_NOT_WORK_WITH_MAX = The Manageable Resource Type may not function as expected with Managed Agent Explorer if \"{0}\" is not included ! >+MRT_CODE_GEN = Code Generation >+MRT_CODE_GEN_TEXT = You can generate code after the creation of the MRT >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 167565
:
57002
|
57011
|
58640