Bug 163126 - Using ToolGroup with stack = true produces uncompiliable code
Summary: Using ToolGroup with stack = true produces uncompiliable code
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 161872
  Show dependency tree
 
Reported: 2006-11-01 14:53 EST by Michael Golubev CLA
Modified: 2010-07-19 22:18 EDT (History)
1 user (show)

See Also:


Attachments
Fixes the subj (23.77 KB, patch)
2006-11-01 15:20 EST, Michael Golubev CLA
no flags Details | Diff
mylar/context/zip (1.79 KB, application/octet-stream)
2006-11-16 07:06 EST, Artem Tikhomirov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2006-11-01 14:53:32 EST
Consider following structure in the tooldef model instance

Palette
   ToolGroup A
      ToolGroup B (stack = true)
         Tool B1
         Tool B2

Generation of the code for this structure creates code with 2 issues:

1. The code can not be compiled because it contains the code like the following for ToolGroup B:

/**
 * @generated
 */
private PaletteContainer createB1Group() {
   PaletteContainer paletteContainer = new PaletteStack("B"); //<- compile error here
   paletteContainer.setDescription("B");
   paletteContainer.add(createB11CreationTool());
   paletteContainer.add(createB22CreationTool());
   paletteContainer.add(createB33CreationTool());
   return paletteContainer;
}

the PaletteStack class does not have constructor with single String parameter, only this one: PaletteStack(String, String, ImageDescriptor)

2. Even would the PaletteStack had this constructor, the method createB1Group() is never called. In particular it is not called from the method 	
private PaletteContainer createA1Group().
Comment 1 Michael Golubev CLA 2006-11-01 15:20:25 EST
Created attachment 53104 [details]
Fixes the subj
Comment 2 Artem Tikhomirov CLA 2006-11-16 07:06:21 EST
Reviewed and committed.
Also added active stack tool selection logic
Comment 3 Artem Tikhomirov CLA 2006-11-16 07:06:23 EST
Created attachment 53983 [details]
mylar/context/zip
Comment 4 Richard Gronback CLA 2008-08-13 13:10:31 EDT
[target cleanup] 2.0 M3 was the original target milestone for this bug
Comment 5 Eclipse Webmaster CLA 2010-07-19 22:18:24 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug