Outline view for Groovy DSL

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Outline view for Groovy DSL

Maxime HAMM

Hi

 

Is it possible to extend the “outline view” to support my groovy DSL ?

(I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

 

Regards,

 

Maxime

 

Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
That's not something that we've worked on yet.  What would you want to see?

On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]> wrote:

> Hi
>
>
>
> Is it possible to extend the “outline view” to support my groovy DSL ?
>
> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”, see
> here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>
>
>
> Regards,
>
>
>
> Maxime
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

In our DSL, we are using the groovy syntax to specify "beans".
A bean is a method. The first parameter is the bean ID.
In the outline I would like to see all beans... alphabetically sorted...

See the SJS file bellow... I want to have a liste that will be
- Traceable
- Project
- ReportOperational
...

Or eventually... a tree that will show the list of field of each bean...
+ Traceable
   - createdTimestamp
   - updatedTimestamp
   - createdBy
   - updatedBy
- Project
- ReportOperational
...

/**
 * Traceable
 */
Interface('Traceable',
    interceptors:'TraceableLifecycleInterceptor',
    icon:'traceable-48x48.png',
    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',
'updatedBy'])
{
  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100
  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,
versionControl:false

  string_32 'createdBy', readOnly:true, preferredWidth: 120
  string_32 'updatedBy', readOnly:true, preferredWidth: 120,
versionControl:false
}

/**
 * Project
 */
Entity ('Project',
    icon:'project-32x32.png',
    extension: 'ProjectExtension',
 
rendered:['name','mainComment.status','manager','progress','parentProject'],
    services:['ProjectService':'ProjectServiceDelegate'],
    processor:'ProjectPropertyProcessors',
    interceptors:['ProjectLifecycleInterceptor'],
    pageSize:20)
{
  string_32 'projectId', mandatory:true, unicityScope:'projectId'
  string_128 'name', mandatory:true, i18nNameKey:'project.name',
preferredWidth: 250
  text 'description'
  bool 'active'
  enumeration 'progress', enumName:'project.progress', preferredWidth: 80,
values:['0', '1', '2'] //0=Not started, 1=started, 2=ended
  string_128 'clarityManager'
  html 'specificity', maxLength:8192
  html 'businessPlan', maxLength:8192
  string_32 'jiraId'

  bool 'selectSTD1', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD2', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD3', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD4', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD5', defaultValue:true, processors:['SelectSTDProcessor']
  text 'selectSTDExplanation'

  // references
  reference 'manager', ref:'User', preferredWidth:100
  reference 'parentProject', ref:'Project', reverse:'Project-subProjects',
processors:'ParentProjectProcessor', preferredWidth: 100
  reference 'projectPhase', ref:'Phase'

  // sets
  set 'subProjects', composition:true, ref:'Project'
  set 'comments', composition:true, ref:'Comment',
processors:'AddCommentProcessor'
  set 'milestones', composition:true, ref:'Milestone'
  set 'phases', composition:true, ref:'Phase',
processors:'AddCommentProcessor'
  set 'preferedProjects', composition:true, ref:'PreferedProject',
versionControl:false
  set 'reportOperationals', composition:true, ref:'ReportOperational',
processors:['ReportOperationals']
  set 'reportSteerings', composition:true, ref:'ReportSteering'

  set 'tasks', composition:true, ref:'Task'
  set 'risks', composition:true, ref:'Risk'
  set 'deliveries', composition:true, ref:'Delivery',
id:'Project-deliveries'

  // computed
  bool 'bookmarked', computed:true
  enumeration 'bookmarkedStatus', computed:true, paramSets:['paramSet.flag']

  bool 'parentProjectDefined', computed:true
  reference 'managerComment', computed:true, ref:'Comment',
id:'Project-managerComment'
  reference 'mainComment', computed:true, ref:'Comment'
  string_256 'descriptionAsString', computed:true

  reference 'commentHistory', ref:'CommentHistories', computed:true,
id:'Project-commentHistory'

  bool 'phase', computed:true
  bool 'includeIn', computed:true, delegateWritable:true
  bool 'includeHp', computed:true, delegateWritable:true

  reference 'lastReportOperational', ref:'ReportOperational', computed:true
  reference 'lastReportSteering', ref:'ReportSteering', computed:true

  string 'more', computed:true, i18nNameKey:'filter.more'
}

Entity ('ReportOperational', processor:'ReportOperationalProcessor',
    extend:['IReport', 'Traceable'],
    services: ['fr.gefco.weather.model.IProjectChild':null],
 
serviceBeans:['ReportOperationalService':'ReportOperationalServiceBean'],
    interceptors:'ReportOperationalLifecycleInterceptor',
    extension: 'ReportOperationalExtension',
    uncloned:['lastReport', 'status', 'year', 'week'],
    ordering:['year':'DESCENDING', 'week':'DESCENDING'],
    rendered:['project', 'year', 'week', 'comment.status',
'project.manager', 'project.manager.userGroup.groupId', 'createdTimestamp',
'updatedTimestamp', 'createdBy', 'updatedBy'],
    toString:'reportDateToString',
    icon:'report-32x32.png',
    pageSize:20)
{
  date 'reportDate'
  integer 'year', preferredWidth: 40, processors:['ReportDateProcessor']
  integer 'week', preferredWidth: 40, processors:['ReportDateProcessor']

  enumeration 'status', enumName:'reportOperational.status',
defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated
  processors:['ReportOperationalStatus']

  html 'contributors', maxLength:8192
  html 'workDone', maxLength:8192
  html 'workTodo', maxLength:8192
  html 'questions', maxLength:8192

  bool 'lastReport'

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-reportOperationals', readOnly:true,
processors:['ProjectProcessor']
  set 'riskComments', composition:true, ref:'RiskComment'
  set 'taskComments', composition:true, ref:'TaskComment'
  set 'attachments', ref:'Attachment'

  //computed
  bool 'validated', computed:true, delegateWritable:true,
i18nNameKey:'reportOperational.status.1'
  //date 'reportDate', computed:true
  string_32 'reportDateToString', computed:true
  reference 'comment', ref:'CommentHistory', computed:true ,
id:'ReportOperational-comment'
  enumeration 'bookmarkedStatus', computed:true,
paramSets:['paramSet.flag'], delegateWritable:true
  html 'reportFullAsHtml', computed:true, delegateWritable:true
  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'
  set 'taskCommentsFinished', computed:true, ref:'TaskComment'
  bool 'commentHistoryCacheReseted', computed:true, delegateWritable:true
}
/**
 * IComment
 */
Interface ('IComment',
    extend:['Traceable'],
    icon:'comment-32x32.png',
    extension: 'ICommentExtension',
    serviceBeans:['ICommentService':'ICommentServiceBean'],
    services: ['org.jspresso.framework.model.component.IComponent':null],
    ordering:['updatedTimestamp':'DESCENDING'],
    toString:'userGroup',
    uncloned:['manager', 'userGroup'],
    pageSize:20)
{
  html 'content', maxLength:8192
  enumeration 'status', mandatory:true, defaultValue:'1',
i18nNameKey:'comment.status', enumName:'comment.status', preferredWidth: 70,
      valuesAndIcons:[
        '1':'sun-89x89.png',
        '2':'sun-cloud-89x89.png',
        '3':'cloud-rain-89x89.png',
        '4':'storm-89x89.png']

  reference 'userGroup', ref:'UserGroup',
booleanWritabilityGates:['groupEditable'], preferredWidth: 120
  reference 'userResponsible', ref:'User', preferredWidth: 120

  bool 'manager', defaultValue:false

  // computed
  string_512 'statusImageUrl', id:'Comment-statusImageUrl', computed:true
  bool 'editable', computed:true
  bool 'groupEditable', computed:true
  integer 'updatedAge', computed:true, preferredWidth: 30,
sqlName:'UPDATED_TIMESTAMP'
  string 'updatedAgeForQuery', computed:true, delegateWritable:true,
preferredWidth: 30

  enumeration 'userKind', enumName:'userKind', computed:true,
preferredWidth: 20, valuesAndIcons:[
        '1':'user-32x32.png',
        '2':'manager-32x32.png']
  reference 'masterComment', ref:'Comment', computed:true
  enumeration 'bookmarkedStatus', computed:true,
paramSets:['paramSet.flag'], delegateWritable:true
  string 'updatedComments', computed:true
  html 'contentAsText', computed:true
}

/**
 * Comment
 */
Entity ('Comment',
    extend:'IComment',
    extension:'CommentExtension',
    services: ['fr.gefco.weather.model.IProjectChild':null],
    rendered:['project', 'userKind', 'status', 'userGroup',
'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',
'updatedBy'],
    interceptors:'CommentLifecycleInterceptor',
    pageSize:20)
{
  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-comments', id:'Comment-project'
  set 'histories', composition:true, ref:'CommentHistory'

  set 'otherComments', ref:'Comment', computed:true

  //
  string 'more', computed:true, i18nNameKey:'filter.more'
}

/**
 * CommentHistory
 */
Entity ('CommentHistory',
    extend:'IComment',
    rendered:['userKind', 'status', 'userGroup', 'content',
'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],
    pageSize:20)
{
  reference 'comment', ref:'Comment', mandatory:true,
reverse:'Comment-histories'
}

/**
 * PreferedProject
 */
Entity ('PreferedProject',
    extension:'PreferedProjectExtension',
    extend:['Traceable'],
    services: ['fr.gefco.weather.model.IProjectChild':null],
    icon:'bookmark-32x32.png')  {
      reference 'user', ref:'User', mandatory:true,
reverse:'User-preferedProjects', readOnly:true, versionControl:false
      reference 'project', ref:'Project', mandatory:true,
id:'PreferedProject-project', reverse:'Project-preferedProjects',
readOnly:true, versionControl:false

      enumeration 'flag', mandatory:true, defaultValue:'0',
paramSets:['paramSet.flag']

      string 'more', computed:true, i18nNameKey:'filter.more'
    }

/**
 * Milestone
 */
Entity ('Milestone',
    icon:'milestone-32x32.png',
    extension: 'MilestoneExtension',
    services: ['fr.gefco.weather.model.IProjectChild':null],
    ordering:['seqNo':'ASCENDING'],
    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',
'autoEvaluation.date'])
{
  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'
  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'
  integer     'seqNo', readOnly:true

  date_time   'realDate', readOnly:true
  integer     'variance', i18nNameKey:'milestone.variance'
  enumeration 'status', enumName:'milestone.status', values:['0', '1', '2']
//0=Not started, 1=started, 2=ended

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-milestones', readOnly:true
  reference 'phase', ref:'Phase', readOnly:true
  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,
id:'Milestone-autoEvaluation'

  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',
composition:false //WARNING:do not set default value composition=true,
Deliveries refers to Project also...

  // computed
  bool 'autoEvaluated', computed:true
}

/**
 * Phase
 */
Entity ('Phase',
    ordering:['seqNo':'ASCENDING'],
    rendered:['name', 'status', 'phaseManagement'])
{
  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'
  string_128  'name', readOnly:true, i18nNameKey:'phase.name'
  integer     'seqNo', readOnly:true

  bool 'phaseManagement', defaultValue:false, grantedRoles:['administrator']

  enumeration 'status', enumName:'phase.status', values:['0', '1', '2']
//0=Not started, 1=started, 2=ended

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-phases', readOnly:true
}





-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : lundi 21 mars 2011 22:18
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL


That's not something that we've worked on yet.  What would you want to see?

On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]>
wrote:

> Hi
>
>
>
> Is it possible to extend the “outline view” to support my groovy DSL ?
>
> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”,
> see here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>
>
>
> Regards,
>
>
>
> Maxime
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hello
I think to achieve this i need to override the method "getAdapter" from the
GroovyEditor class... but how can I do that ?
Regards,
Maxime

-----Message d'origine-----
De : Maxime HAMM [mailto:[hidden email]]
Envoyé : lundi 21 mars 2011 22:32
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL



In our DSL, we are using the groovy syntax to specify "beans".
A bean is a method. The first parameter is the bean ID.
In the outline I would like to see all beans... alphabetically sorted...

See the SJS file bellow... I want to have a liste that will be
- Traceable
- Project
- ReportOperational
...

Or eventually... a tree that will show the list of field of each bean...
+ Traceable
   - createdTimestamp
   - updatedTimestamp
   - createdBy
   - updatedBy
- Project
- ReportOperational
...

/**
 * Traceable
 */
Interface('Traceable',
    interceptors:'TraceableLifecycleInterceptor',
    icon:'traceable-48x48.png',
    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',
'updatedBy'])
{
  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100
  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,
versionControl:false

  string_32 'createdBy', readOnly:true, preferredWidth: 120
  string_32 'updatedBy', readOnly:true, preferredWidth: 120,
versionControl:false }

/**
 * Project
 */
Entity ('Project',
    icon:'project-32x32.png',
    extension: 'ProjectExtension',
 
rendered:['name','mainComment.status','manager','progress','parentProject'],
    services:['ProjectService':'ProjectServiceDelegate'],
    processor:'ProjectPropertyProcessors',
    interceptors:['ProjectLifecycleInterceptor'],
    pageSize:20)
{
  string_32 'projectId', mandatory:true, unicityScope:'projectId'
  string_128 'name', mandatory:true, i18nNameKey:'project.name',
preferredWidth: 250
  text 'description'
  bool 'active'
  enumeration 'progress', enumName:'project.progress', preferredWidth: 80,
values:['0', '1', '2'] //0=Not started, 1=started, 2=ended
  string_128 'clarityManager'
  html 'specificity', maxLength:8192
  html 'businessPlan', maxLength:8192
  string_32 'jiraId'

  bool 'selectSTD1', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD2', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD3', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD4', defaultValue:true, processors:['SelectSTDProcessor']
  bool 'selectSTD5', defaultValue:true, processors:['SelectSTDProcessor']
  text 'selectSTDExplanation'

  // references
  reference 'manager', ref:'User', preferredWidth:100
  reference 'parentProject', ref:'Project', reverse:'Project-subProjects',
processors:'ParentProjectProcessor', preferredWidth: 100
  reference 'projectPhase', ref:'Phase'

  // sets
  set 'subProjects', composition:true, ref:'Project'
  set 'comments', composition:true, ref:'Comment',
processors:'AddCommentProcessor'
  set 'milestones', composition:true, ref:'Milestone'
  set 'phases', composition:true, ref:'Phase',
processors:'AddCommentProcessor'
  set 'preferedProjects', composition:true, ref:'PreferedProject',
versionControl:false
  set 'reportOperationals', composition:true, ref:'ReportOperational',
processors:['ReportOperationals']
  set 'reportSteerings', composition:true, ref:'ReportSteering'

  set 'tasks', composition:true, ref:'Task'
  set 'risks', composition:true, ref:'Risk'
  set 'deliveries', composition:true, ref:'Delivery',
id:'Project-deliveries'

  // computed
  bool 'bookmarked', computed:true
  enumeration 'bookmarkedStatus', computed:true, paramSets:['paramSet.flag']

  bool 'parentProjectDefined', computed:true
  reference 'managerComment', computed:true, ref:'Comment',
id:'Project-managerComment'
  reference 'mainComment', computed:true, ref:'Comment'
  string_256 'descriptionAsString', computed:true

  reference 'commentHistory', ref:'CommentHistories', computed:true,
id:'Project-commentHistory'

  bool 'phase', computed:true
  bool 'includeIn', computed:true, delegateWritable:true
  bool 'includeHp', computed:true, delegateWritable:true

  reference 'lastReportOperational', ref:'ReportOperational', computed:true
  reference 'lastReportSteering', ref:'ReportSteering', computed:true

  string 'more', computed:true, i18nNameKey:'filter.more'
}

Entity ('ReportOperational', processor:'ReportOperationalProcessor',
    extend:['IReport', 'Traceable'],
    services: ['fr.gefco.weather.model.IProjectChild':null],
 
serviceBeans:['ReportOperationalService':'ReportOperationalServiceBean'],
    interceptors:'ReportOperationalLifecycleInterceptor',
    extension: 'ReportOperationalExtension',
    uncloned:['lastReport', 'status', 'year', 'week'],
    ordering:['year':'DESCENDING', 'week':'DESCENDING'],
    rendered:['project', 'year', 'week', 'comment.status',
'project.manager', 'project.manager.userGroup.groupId', 'createdTimestamp',
'updatedTimestamp', 'createdBy', 'updatedBy'],
    toString:'reportDateToString',
    icon:'report-32x32.png',
    pageSize:20)
{
  date 'reportDate'
  integer 'year', preferredWidth: 40, processors:['ReportDateProcessor']
  integer 'week', preferredWidth: 40, processors:['ReportDateProcessor']

  enumeration 'status', enumName:'reportOperational.status',
defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated
  processors:['ReportOperationalStatus']

  html 'contributors', maxLength:8192
  html 'workDone', maxLength:8192
  html 'workTodo', maxLength:8192
  html 'questions', maxLength:8192

  bool 'lastReport'

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-reportOperationals', readOnly:true,
processors:['ProjectProcessor']
  set 'riskComments', composition:true, ref:'RiskComment'
  set 'taskComments', composition:true, ref:'TaskComment'
  set 'attachments', ref:'Attachment'

  //computed
  bool 'validated', computed:true, delegateWritable:true,
i18nNameKey:'reportOperational.status.1'
  //date 'reportDate', computed:true
  string_32 'reportDateToString', computed:true
  reference 'comment', ref:'CommentHistory', computed:true ,
id:'ReportOperational-comment'
  enumeration 'bookmarkedStatus', computed:true,
paramSets:['paramSet.flag'], delegateWritable:true
  html 'reportFullAsHtml', computed:true, delegateWritable:true
  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'
  set 'taskCommentsFinished', computed:true, ref:'TaskComment'
  bool 'commentHistoryCacheReseted', computed:true, delegateWritable:true }
/**
 * IComment
 */
Interface ('IComment',
    extend:['Traceable'],
    icon:'comment-32x32.png',
    extension: 'ICommentExtension',
    serviceBeans:['ICommentService':'ICommentServiceBean'],
    services: ['org.jspresso.framework.model.component.IComponent':null],
    ordering:['updatedTimestamp':'DESCENDING'],
    toString:'userGroup',
    uncloned:['manager', 'userGroup'],
    pageSize:20)
{
  html 'content', maxLength:8192
  enumeration 'status', mandatory:true, defaultValue:'1',
i18nNameKey:'comment.status', enumName:'comment.status', preferredWidth: 70,
      valuesAndIcons:[
        '1':'sun-89x89.png',
        '2':'sun-cloud-89x89.png',
        '3':'cloud-rain-89x89.png',
        '4':'storm-89x89.png']

  reference 'userGroup', ref:'UserGroup',
booleanWritabilityGates:['groupEditable'], preferredWidth: 120
  reference 'userResponsible', ref:'User', preferredWidth: 120

  bool 'manager', defaultValue:false

  // computed
  string_512 'statusImageUrl', id:'Comment-statusImageUrl', computed:true
  bool 'editable', computed:true
  bool 'groupEditable', computed:true
  integer 'updatedAge', computed:true, preferredWidth: 30,
sqlName:'UPDATED_TIMESTAMP'
  string 'updatedAgeForQuery', computed:true, delegateWritable:true,
preferredWidth: 30

  enumeration 'userKind', enumName:'userKind', computed:true,
preferredWidth: 20, valuesAndIcons:[
        '1':'user-32x32.png',
        '2':'manager-32x32.png']
  reference 'masterComment', ref:'Comment', computed:true
  enumeration 'bookmarkedStatus', computed:true,
paramSets:['paramSet.flag'], delegateWritable:true
  string 'updatedComments', computed:true
  html 'contentAsText', computed:true
}

/**
 * Comment
 */
Entity ('Comment',
    extend:'IComment',
    extension:'CommentExtension',
    services: ['fr.gefco.weather.model.IProjectChild':null],
    rendered:['project', 'userKind', 'status', 'userGroup',
'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',
'updatedBy'],
    interceptors:'CommentLifecycleInterceptor',
    pageSize:20)
{
  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-comments', id:'Comment-project'
  set 'histories', composition:true, ref:'CommentHistory'

  set 'otherComments', ref:'Comment', computed:true

  //
  string 'more', computed:true, i18nNameKey:'filter.more'
}

/**
 * CommentHistory
 */
Entity ('CommentHistory',
    extend:'IComment',
    rendered:['userKind', 'status', 'userGroup', 'content',
'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],
    pageSize:20)
{
  reference 'comment', ref:'Comment', mandatory:true,
reverse:'Comment-histories'
}

/**
 * PreferedProject
 */
Entity ('PreferedProject',
    extension:'PreferedProjectExtension',
    extend:['Traceable'],
    services: ['fr.gefco.weather.model.IProjectChild':null],
    icon:'bookmark-32x32.png')  {
      reference 'user', ref:'User', mandatory:true,
reverse:'User-preferedProjects', readOnly:true, versionControl:false
      reference 'project', ref:'Project', mandatory:true,
id:'PreferedProject-project', reverse:'Project-preferedProjects',
readOnly:true, versionControl:false

      enumeration 'flag', mandatory:true, defaultValue:'0',
paramSets:['paramSet.flag']

      string 'more', computed:true, i18nNameKey:'filter.more'
    }

/**
 * Milestone
 */
Entity ('Milestone',
    icon:'milestone-32x32.png',
    extension: 'MilestoneExtension',
    services: ['fr.gefco.weather.model.IProjectChild':null],
    ordering:['seqNo':'ASCENDING'],
    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',
'autoEvaluation.date'])
{
  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'
  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'
  integer     'seqNo', readOnly:true

  date_time   'realDate', readOnly:true
  integer     'variance', i18nNameKey:'milestone.variance'
  enumeration 'status', enumName:'milestone.status', values:['0', '1', '2']
//0=Not started, 1=started, 2=ended

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-milestones', readOnly:true
  reference 'phase', ref:'Phase', readOnly:true
  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,
id:'Milestone-autoEvaluation'

  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',
composition:false //WARNING:do not set default value composition=true,
Deliveries refers to Project also...

  // computed
  bool 'autoEvaluated', computed:true
}

/**
 * Phase
 */
Entity ('Phase',
    ordering:['seqNo':'ASCENDING'],
    rendered:['name', 'status', 'phaseManagement']) {
  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'
  string_128  'name', readOnly:true, i18nNameKey:'phase.name'
  integer     'seqNo', readOnly:true

  bool 'phaseManagement', defaultValue:false, grantedRoles:['administrator']

  enumeration 'status', enumName:'phase.status', values:['0', '1', '2']
//0=Not started, 1=started, 2=ended

  reference 'project', ref:'Project', mandatory:true,
reverse:'Project-phases', readOnly:true }





-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :
[hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL


That's not something that we've worked on yet.  What would you want to see?

On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]>
wrote:

> Hi
>
>
>
> Is it possible to extend the “outline view” to support my groovy DSL ?
>
> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”,
> see here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>
>
>
> Regards,
>
>
>
> Maxime
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
Hi Maxime,

What I'd recommend doing first is checking out the Groovy source code
and directly changing the getAdapter method in the GroovyEditor class.

Alternatively, you can create your own editor that subclasses the
GroovyEditor and then also create your own editor extension in a
custom plugin.  This would be a way to test out your idea.  If this is
something that is workable, then we can incorporate it directly into
Groovy-Eclipse.

More importantly, though, I'm not sure if overriding this method is
the best way to go.  There is a method called setOutlinePageInput
declared in JavaEditor.  Perhaps overriding this method will get you
what you need.  I *think* what you need to do is call setInput on some
sort of mock IJavaElement that you create and where you populate the
getChildren method.  (This is just an idea and I don't know if it will
work.)

Let me know if you are going to explore this further and we can discuss more.


On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>
> Hello
> I think to achieve this i need to override the method "getAdapter" from the
> GroovyEditor class... but how can I do that ?
> Regards,
> Maxime
>
> -----Message d'origine-----
> De : Maxime HAMM [mailto:[hidden email]]
> Envoyé : lundi 21 mars 2011 22:32
> À : [hidden email]
> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>
>
>
> In our DSL, we are using the groovy syntax to specify "beans".
> A bean is a method. The first parameter is the bean ID.
> In the outline I would like to see all beans... alphabetically sorted...
>
> See the SJS file bellow... I want to have a liste that will be
> - Traceable
> - Project
> - ReportOperational
> ...
>
> Or eventually... a tree that will show the list of field of each bean...
> + Traceable
>   - createdTimestamp
>   - updatedTimestamp
>   - createdBy
>   - updatedBy
> - Project
> - ReportOperational
> ...
>
> /**
>  * Traceable
>  */
> Interface('Traceable',
>    interceptors:'TraceableLifecycleInterceptor',
>    icon:'traceable-48x48.png',
>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',
> 'updatedBy'])
> {
>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100
>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,
> versionControl:false
>
>  string_32 'createdBy', readOnly:true, preferredWidth: 120
>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,
> versionControl:false }
>
> /**
>  * Project
>  */
> Entity ('Project',
>    icon:'project-32x32.png',
>    extension: 'ProjectExtension',
>
> rendered:['name','mainComment.status','manager','progress','parentProject'],
>    services:['ProjectService':'ProjectServiceDelegate'],
>    processor:'ProjectPropertyProcessors',
>    interceptors:['ProjectLifecycleInterceptor'],
>    pageSize:20)
> {
>  string_32 'projectId', mandatory:true, unicityScope:'projectId'
>  string_128 'name', mandatory:true, i18nNameKey:'project.name',
> preferredWidth: 250
>  text 'description'
>  bool 'active'
>  enumeration 'progress', enumName:'project.progress', preferredWidth: 80,
> values:['0', '1', '2'] //0=Not started, 1=started, 2=ended
>  string_128 'clarityManager'
>  html 'specificity', maxLength:8192
>  html 'businessPlan', maxLength:8192
>  string_32 'jiraId'
>
>  bool 'selectSTD1', defaultValue:true, processors:['SelectSTDProcessor']
>  bool 'selectSTD2', defaultValue:true, processors:['SelectSTDProcessor']
>  bool 'selectSTD3', defaultValue:true, processors:['SelectSTDProcessor']
>  bool 'selectSTD4', defaultValue:true, processors:['SelectSTDProcessor']
>  bool 'selectSTD5', defaultValue:true, processors:['SelectSTDProcessor']
>  text 'selectSTDExplanation'
>
>  // references
>  reference 'manager', ref:'User', preferredWidth:100
>  reference 'parentProject', ref:'Project', reverse:'Project-subProjects',
> processors:'ParentProjectProcessor', preferredWidth: 100
>  reference 'projectPhase', ref:'Phase'
>
>  // sets
>  set 'subProjects', composition:true, ref:'Project'
>  set 'comments', composition:true, ref:'Comment',
> processors:'AddCommentProcessor'
>  set 'milestones', composition:true, ref:'Milestone'
>  set 'phases', composition:true, ref:'Phase',
> processors:'AddCommentProcessor'
>  set 'preferedProjects', composition:true, ref:'PreferedProject',
> versionControl:false
>  set 'reportOperationals', composition:true, ref:'ReportOperational',
> processors:['ReportOperationals']
>  set 'reportSteerings', composition:true, ref:'ReportSteering'
>
>  set 'tasks', composition:true, ref:'Task'
>  set 'risks', composition:true, ref:'Risk'
>  set 'deliveries', composition:true, ref:'Delivery',
> id:'Project-deliveries'
>
>  // computed
>  bool 'bookmarked', computed:true
>  enumeration 'bookmarkedStatus', computed:true, paramSets:['paramSet.flag']
>
>  bool 'parentProjectDefined', computed:true
>  reference 'managerComment', computed:true, ref:'Comment',
> id:'Project-managerComment'
>  reference 'mainComment', computed:true, ref:'Comment'
>  string_256 'descriptionAsString', computed:true
>
>  reference 'commentHistory', ref:'CommentHistories', computed:true,
> id:'Project-commentHistory'
>
>  bool 'phase', computed:true
>  bool 'includeIn', computed:true, delegateWritable:true
>  bool 'includeHp', computed:true, delegateWritable:true
>
>  reference 'lastReportOperational', ref:'ReportOperational', computed:true
>  reference 'lastReportSteering', ref:'ReportSteering', computed:true
>
>  string 'more', computed:true, i18nNameKey:'filter.more'
> }
>
> Entity ('ReportOperational', processor:'ReportOperationalProcessor',
>    extend:['IReport', 'Traceable'],
>    services: ['fr.gefco.weather.model.IProjectChild':null],
>
> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBean'],
>    interceptors:'ReportOperationalLifecycleInterceptor',
>    extension: 'ReportOperationalExtension',
>    uncloned:['lastReport', 'status', 'year', 'week'],
>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],
>    rendered:['project', 'year', 'week', 'comment.status',
> 'project.manager', 'project.manager.userGroup.groupId', 'createdTimestamp',
> 'updatedTimestamp', 'createdBy', 'updatedBy'],
>    toString:'reportDateToString',
>    icon:'report-32x32.png',
>    pageSize:20)
> {
>  date 'reportDate'
>  integer 'year', preferredWidth: 40, processors:['ReportDateProcessor']
>  integer 'week', preferredWidth: 40, processors:['ReportDateProcessor']
>
>  enumeration 'status', enumName:'reportOperational.status',
> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated
>  processors:['ReportOperationalStatus']
>
>  html 'contributors', maxLength:8192
>  html 'workDone', maxLength:8192
>  html 'workTodo', maxLength:8192
>  html 'questions', maxLength:8192
>
>  bool 'lastReport'
>
>  reference 'project', ref:'Project', mandatory:true,
> reverse:'Project-reportOperationals', readOnly:true,
> processors:['ProjectProcessor']
>  set 'riskComments', composition:true, ref:'RiskComment'
>  set 'taskComments', composition:true, ref:'TaskComment'
>  set 'attachments', ref:'Attachment'
>
>  //computed
>  bool 'validated', computed:true, delegateWritable:true,
> i18nNameKey:'reportOperational.status.1'
>  //date 'reportDate', computed:true
>  string_32 'reportDateToString', computed:true
>  reference 'comment', ref:'CommentHistory', computed:true ,
> id:'ReportOperational-comment'
>  enumeration 'bookmarkedStatus', computed:true,
> paramSets:['paramSet.flag'], delegateWritable:true
>  html 'reportFullAsHtml', computed:true, delegateWritable:true
>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'
>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'
>  bool 'commentHistoryCacheReseted', computed:true, delegateWritable:true }
> /**
>  * IComment
>  */
> Interface ('IComment',
>    extend:['Traceable'],
>    icon:'comment-32x32.png',
>    extension: 'ICommentExtension',
>    serviceBeans:['ICommentService':'ICommentServiceBean'],
>    services: ['org.jspresso.framework.model.component.IComponent':null],
>    ordering:['updatedTimestamp':'DESCENDING'],
>    toString:'userGroup',
>    uncloned:['manager', 'userGroup'],
>    pageSize:20)
> {
>  html 'content', maxLength:8192
>  enumeration 'status', mandatory:true, defaultValue:'1',
> i18nNameKey:'comment.status', enumName:'comment.status', preferredWidth: 70,
>      valuesAndIcons:[
>        '1':'sun-89x89.png',
>        '2':'sun-cloud-89x89.png',
>        '3':'cloud-rain-89x89.png',
>        '4':'storm-89x89.png']
>
>  reference 'userGroup', ref:'UserGroup',
> booleanWritabilityGates:['groupEditable'], preferredWidth: 120
>  reference 'userResponsible', ref:'User', preferredWidth: 120
>
>  bool 'manager', defaultValue:false
>
>  // computed
>  string_512 'statusImageUrl', id:'Comment-statusImageUrl', computed:true
>  bool 'editable', computed:true
>  bool 'groupEditable', computed:true
>  integer 'updatedAge', computed:true, preferredWidth: 30,
> sqlName:'UPDATED_TIMESTAMP'
>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,
> preferredWidth: 30
>
>  enumeration 'userKind', enumName:'userKind', computed:true,
> preferredWidth: 20, valuesAndIcons:[
>        '1':'user-32x32.png',
>        '2':'manager-32x32.png']
>  reference 'masterComment', ref:'Comment', computed:true
>  enumeration 'bookmarkedStatus', computed:true,
> paramSets:['paramSet.flag'], delegateWritable:true
>  string 'updatedComments', computed:true
>  html 'contentAsText', computed:true
> }
>
> /**
>  * Comment
>  */
> Entity ('Comment',
>    extend:'IComment',
>    extension:'CommentExtension',
>    services: ['fr.gefco.weather.model.IProjectChild':null],
>    rendered:['project', 'userKind', 'status', 'userGroup',
> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',
> 'updatedBy'],
>    interceptors:'CommentLifecycleInterceptor',
>    pageSize:20)
> {
>  reference 'project', ref:'Project', mandatory:true,
> reverse:'Project-comments', id:'Comment-project'
>  set 'histories', composition:true, ref:'CommentHistory'
>
>  set 'otherComments', ref:'Comment', computed:true
>
>  //
>  string 'more', computed:true, i18nNameKey:'filter.more'
> }
>
> /**
>  * CommentHistory
>  */
> Entity ('CommentHistory',
>    extend:'IComment',
>    rendered:['userKind', 'status', 'userGroup', 'content',
> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],
>    pageSize:20)
> {
>  reference 'comment', ref:'Comment', mandatory:true,
> reverse:'Comment-histories'
> }
>
> /**
>  * PreferedProject
>  */
> Entity ('PreferedProject',
>    extension:'PreferedProjectExtension',
>    extend:['Traceable'],
>    services: ['fr.gefco.weather.model.IProjectChild':null],
>    icon:'bookmark-32x32.png')  {
>      reference 'user', ref:'User', mandatory:true,
> reverse:'User-preferedProjects', readOnly:true, versionControl:false
>      reference 'project', ref:'Project', mandatory:true,
> id:'PreferedProject-project', reverse:'Project-preferedProjects',
> readOnly:true, versionControl:false
>
>      enumeration 'flag', mandatory:true, defaultValue:'0',
> paramSets:['paramSet.flag']
>
>      string 'more', computed:true, i18nNameKey:'filter.more'
>    }
>
> /**
>  * Milestone
>  */
> Entity ('Milestone',
>    icon:'milestone-32x32.png',
>    extension: 'MilestoneExtension',
>    services: ['fr.gefco.weather.model.IProjectChild':null],
>    ordering:['seqNo':'ASCENDING'],
>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',
> 'autoEvaluation.date'])
> {
>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'
>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'
>  integer     'seqNo', readOnly:true
>
>  date_time   'realDate', readOnly:true
>  integer     'variance', i18nNameKey:'milestone.variance'
>  enumeration 'status', enumName:'milestone.status', values:['0', '1', '2']
> //0=Not started, 1=started, 2=ended
>
>  reference 'project', ref:'Project', mandatory:true,
> reverse:'Project-milestones', readOnly:true
>  reference 'phase', ref:'Phase', readOnly:true
>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,
> id:'Milestone-autoEvaluation'
>
>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',
> composition:false //WARNING:do not set default value composition=true,
> Deliveries refers to Project also...
>
>  // computed
>  bool 'autoEvaluated', computed:true
> }
>
> /**
>  * Phase
>  */
> Entity ('Phase',
>    ordering:['seqNo':'ASCENDING'],
>    rendered:['name', 'status', 'phaseManagement']) {
>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'
>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'
>  integer     'seqNo', readOnly:true
>
>  bool 'phaseManagement', defaultValue:false, grantedRoles:['administrator']
>
>  enumeration 'status', enumName:'phase.status', values:['0', '1', '2']
> //0=Not started, 1=started, 2=ended
>
>  reference 'project', ref:'Project', mandatory:true,
> reverse:'Project-phases', readOnly:true }
>
>
>
>
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :
> [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>
>
> That's not something that we've worked on yet.  What would you want to see?
>
> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]>
> wrote:
>> Hi
>>
>>
>>
>> Is it possible to extend the “outline view” to support my groovy DSL ?
>>
>> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”,
>> see here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>>
>>
>>
>> Regards,
>>
>>
>>
>> Maxime
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
Here is some information about checking out the groovy-eclipse source code:
http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse+Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSourcefromSVN

On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

> Hi Maxime,
>
> What I'd recommend doing first is checking out the Groovy source code
> and directly changing the getAdapter method in the GroovyEditor class.
>
> Alternatively, you can create your own editor that subclasses the
> GroovyEditor and then also create your own editor extension in a
> custom plugin.  This would be a way to test out your idea.  If this is
> something that is workable, then we can incorporate it directly into
> Groovy-Eclipse.
>
> More importantly, though, I'm not sure if overriding this method is
> the best way to go.  There is a method called setOutlinePageInput
> declared in JavaEditor.  Perhaps overriding this method will get you
> what you need.  I *think* what you need to do is call setInput on some
> sort of mock IJavaElement that you create and where you populate the
> getChildren method.  (This is just an idea and I don't know if it will
> work.)
>
> Let me know if you are going to explore this further and we can discuss more.
>
>
> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:
>>
>> Hello
>> I think to achieve this i need to override the method "getAdapter" from the
>> GroovyEditor class... but how can I do that ?
>> Regards,
>> Maxime
>>
>> -----Message d'origine-----
>> De : Maxime HAMM [mailto:[hidden email]]
>> Envoyé : lundi 21 mars 2011 22:32
>> À : [hidden email]
>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>>
>>
>>
>> In our DSL, we are using the groovy syntax to specify "beans".
>> A bean is a method. The first parameter is the bean ID.
>> In the outline I would like to see all beans... alphabetically sorted...
>>
>> See the SJS file bellow... I want to have a liste that will be
>> - Traceable
>> - Project
>> - ReportOperational
>> ...
>>
>> Or eventually... a tree that will show the list of field of each bean...
>> + Traceable
>>   - createdTimestamp
>>   - updatedTimestamp
>>   - createdBy
>>   - updatedBy
>> - Project
>> - ReportOperational
>> ...
>>
>> /**
>>  * Traceable
>>  */
>> Interface('Traceable',
>>    interceptors:'TraceableLifecycleInterceptor',
>>    icon:'traceable-48x48.png',
>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',
>> 'updatedBy'])
>> {
>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100
>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,
>> versionControl:false
>>
>>  string_32 'createdBy', readOnly:true, preferredWidth: 120
>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,
>> versionControl:false }
>>
>> /**
>>  * Project
>>  */
>> Entity ('Project',
>>    icon:'project-32x32.png',
>>    extension: 'ProjectExtension',
>>
>> rendered:['name','mainComment.status','manager','progress','parentProject'],
>>    services:['ProjectService':'ProjectServiceDelegate'],
>>    processor:'ProjectPropertyProcessors',
>>    interceptors:['ProjectLifecycleInterceptor'],
>>    pageSize:20)
>> {
>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'
>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',
>> preferredWidth: 250
>>  text 'description'
>>  bool 'active'
>>  enumeration 'progress', enumName:'project.progress', preferredWidth: 80,
>> values:['0', '1', '2'] //0=Not started, 1=started, 2=ended
>>  string_128 'clarityManager'
>>  html 'specificity', maxLength:8192
>>  html 'businessPlan', maxLength:8192
>>  string_32 'jiraId'
>>
>>  bool 'selectSTD1', defaultValue:true, processors:['SelectSTDProcessor']
>>  bool 'selectSTD2', defaultValue:true, processors:['SelectSTDProcessor']
>>  bool 'selectSTD3', defaultValue:true, processors:['SelectSTDProcessor']
>>  bool 'selectSTD4', defaultValue:true, processors:['SelectSTDProcessor']
>>  bool 'selectSTD5', defaultValue:true, processors:['SelectSTDProcessor']
>>  text 'selectSTDExplanation'
>>
>>  // references
>>  reference 'manager', ref:'User', preferredWidth:100
>>  reference 'parentProject', ref:'Project', reverse:'Project-subProjects',
>> processors:'ParentProjectProcessor', preferredWidth: 100
>>  reference 'projectPhase', ref:'Phase'
>>
>>  // sets
>>  set 'subProjects', composition:true, ref:'Project'
>>  set 'comments', composition:true, ref:'Comment',
>> processors:'AddCommentProcessor'
>>  set 'milestones', composition:true, ref:'Milestone'
>>  set 'phases', composition:true, ref:'Phase',
>> processors:'AddCommentProcessor'
>>  set 'preferedProjects', composition:true, ref:'PreferedProject',
>> versionControl:false
>>  set 'reportOperationals', composition:true, ref:'ReportOperational',
>> processors:['ReportOperationals']
>>  set 'reportSteerings', composition:true, ref:'ReportSteering'
>>
>>  set 'tasks', composition:true, ref:'Task'
>>  set 'risks', composition:true, ref:'Risk'
>>  set 'deliveries', composition:true, ref:'Delivery',
>> id:'Project-deliveries'
>>
>>  // computed
>>  bool 'bookmarked', computed:true
>>  enumeration 'bookmarkedStatus', computed:true, paramSets:['paramSet.flag']
>>
>>  bool 'parentProjectDefined', computed:true
>>  reference 'managerComment', computed:true, ref:'Comment',
>> id:'Project-managerComment'
>>  reference 'mainComment', computed:true, ref:'Comment'
>>  string_256 'descriptionAsString', computed:true
>>
>>  reference 'commentHistory', ref:'CommentHistories', computed:true,
>> id:'Project-commentHistory'
>>
>>  bool 'phase', computed:true
>>  bool 'includeIn', computed:true, delegateWritable:true
>>  bool 'includeHp', computed:true, delegateWritable:true
>>
>>  reference 'lastReportOperational', ref:'ReportOperational', computed:true
>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true
>>
>>  string 'more', computed:true, i18nNameKey:'filter.more'
>> }
>>
>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',
>>    extend:['IReport', 'Traceable'],
>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>
>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBean'],
>>    interceptors:'ReportOperationalLifecycleInterceptor',
>>    extension: 'ReportOperationalExtension',
>>    uncloned:['lastReport', 'status', 'year', 'week'],
>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],
>>    rendered:['project', 'year', 'week', 'comment.status',
>> 'project.manager', 'project.manager.userGroup.groupId', 'createdTimestamp',
>> 'updatedTimestamp', 'createdBy', 'updatedBy'],
>>    toString:'reportDateToString',
>>    icon:'report-32x32.png',
>>    pageSize:20)
>> {
>>  date 'reportDate'
>>  integer 'year', preferredWidth: 40, processors:['ReportDateProcessor']
>>  integer 'week', preferredWidth: 40, processors:['ReportDateProcessor']
>>
>>  enumeration 'status', enumName:'reportOperational.status',
>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated
>>  processors:['ReportOperationalStatus']
>>
>>  html 'contributors', maxLength:8192
>>  html 'workDone', maxLength:8192
>>  html 'workTodo', maxLength:8192
>>  html 'questions', maxLength:8192
>>
>>  bool 'lastReport'
>>
>>  reference 'project', ref:'Project', mandatory:true,
>> reverse:'Project-reportOperationals', readOnly:true,
>> processors:['ProjectProcessor']
>>  set 'riskComments', composition:true, ref:'RiskComment'
>>  set 'taskComments', composition:true, ref:'TaskComment'
>>  set 'attachments', ref:'Attachment'
>>
>>  //computed
>>  bool 'validated', computed:true, delegateWritable:true,
>> i18nNameKey:'reportOperational.status.1'
>>  //date 'reportDate', computed:true
>>  string_32 'reportDateToString', computed:true
>>  reference 'comment', ref:'CommentHistory', computed:true ,
>> id:'ReportOperational-comment'
>>  enumeration 'bookmarkedStatus', computed:true,
>> paramSets:['paramSet.flag'], delegateWritable:true
>>  html 'reportFullAsHtml', computed:true, delegateWritable:true
>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'
>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'
>>  bool 'commentHistoryCacheReseted', computed:true, delegateWritable:true }
>> /**
>>  * IComment
>>  */
>> Interface ('IComment',
>>    extend:['Traceable'],
>>    icon:'comment-32x32.png',
>>    extension: 'ICommentExtension',
>>    serviceBeans:['ICommentService':'ICommentServiceBean'],
>>    services: ['org.jspresso.framework.model.component.IComponent':null],
>>    ordering:['updatedTimestamp':'DESCENDING'],
>>    toString:'userGroup',
>>    uncloned:['manager', 'userGroup'],
>>    pageSize:20)
>> {
>>  html 'content', maxLength:8192
>>  enumeration 'status', mandatory:true, defaultValue:'1',
>> i18nNameKey:'comment.status', enumName:'comment.status', preferredWidth: 70,
>>      valuesAndIcons:[
>>        '1':'sun-89x89.png',
>>        '2':'sun-cloud-89x89.png',
>>        '3':'cloud-rain-89x89.png',
>>        '4':'storm-89x89.png']
>>
>>  reference 'userGroup', ref:'UserGroup',
>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120
>>  reference 'userResponsible', ref:'User', preferredWidth: 120
>>
>>  bool 'manager', defaultValue:false
>>
>>  // computed
>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl', computed:true
>>  bool 'editable', computed:true
>>  bool 'groupEditable', computed:true
>>  integer 'updatedAge', computed:true, preferredWidth: 30,
>> sqlName:'UPDATED_TIMESTAMP'
>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,
>> preferredWidth: 30
>>
>>  enumeration 'userKind', enumName:'userKind', computed:true,
>> preferredWidth: 20, valuesAndIcons:[
>>        '1':'user-32x32.png',
>>        '2':'manager-32x32.png']
>>  reference 'masterComment', ref:'Comment', computed:true
>>  enumeration 'bookmarkedStatus', computed:true,
>> paramSets:['paramSet.flag'], delegateWritable:true
>>  string 'updatedComments', computed:true
>>  html 'contentAsText', computed:true
>> }
>>
>> /**
>>  * Comment
>>  */
>> Entity ('Comment',
>>    extend:'IComment',
>>    extension:'CommentExtension',
>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>    rendered:['project', 'userKind', 'status', 'userGroup',
>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',
>> 'updatedBy'],
>>    interceptors:'CommentLifecycleInterceptor',
>>    pageSize:20)
>> {
>>  reference 'project', ref:'Project', mandatory:true,
>> reverse:'Project-comments', id:'Comment-project'
>>  set 'histories', composition:true, ref:'CommentHistory'
>>
>>  set 'otherComments', ref:'Comment', computed:true
>>
>>  //
>>  string 'more', computed:true, i18nNameKey:'filter.more'
>> }
>>
>> /**
>>  * CommentHistory
>>  */
>> Entity ('CommentHistory',
>>    extend:'IComment',
>>    rendered:['userKind', 'status', 'userGroup', 'content',
>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],
>>    pageSize:20)
>> {
>>  reference 'comment', ref:'Comment', mandatory:true,
>> reverse:'Comment-histories'
>> }
>>
>> /**
>>  * PreferedProject
>>  */
>> Entity ('PreferedProject',
>>    extension:'PreferedProjectExtension',
>>    extend:['Traceable'],
>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>    icon:'bookmark-32x32.png')  {
>>      reference 'user', ref:'User', mandatory:true,
>> reverse:'User-preferedProjects', readOnly:true, versionControl:false
>>      reference 'project', ref:'Project', mandatory:true,
>> id:'PreferedProject-project', reverse:'Project-preferedProjects',
>> readOnly:true, versionControl:false
>>
>>      enumeration 'flag', mandatory:true, defaultValue:'0',
>> paramSets:['paramSet.flag']
>>
>>      string 'more', computed:true, i18nNameKey:'filter.more'
>>    }
>>
>> /**
>>  * Milestone
>>  */
>> Entity ('Milestone',
>>    icon:'milestone-32x32.png',
>>    extension: 'MilestoneExtension',
>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>    ordering:['seqNo':'ASCENDING'],
>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',
>> 'autoEvaluation.date'])
>> {
>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'
>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'
>>  integer     'seqNo', readOnly:true
>>
>>  date_time   'realDate', readOnly:true
>>  integer     'variance', i18nNameKey:'milestone.variance'
>>  enumeration 'status', enumName:'milestone.status', values:['0', '1', '2']
>> //0=Not started, 1=started, 2=ended
>>
>>  reference 'project', ref:'Project', mandatory:true,
>> reverse:'Project-milestones', readOnly:true
>>  reference 'phase', ref:'Phase', readOnly:true
>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,
>> id:'Milestone-autoEvaluation'
>>
>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',
>> composition:false //WARNING:do not set default value composition=true,
>> Deliveries refers to Project also...
>>
>>  // computed
>>  bool 'autoEvaluated', computed:true
>> }
>>
>> /**
>>  * Phase
>>  */
>> Entity ('Phase',
>>    ordering:['seqNo':'ASCENDING'],
>>    rendered:['name', 'status', 'phaseManagement']) {
>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'
>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'
>>  integer     'seqNo', readOnly:true
>>
>>  bool 'phaseManagement', defaultValue:false, grantedRoles:['administrator']
>>
>>  enumeration 'status', enumName:'phase.status', values:['0', '1', '2']
>> //0=Not started, 1=started, 2=ended
>>
>>  reference 'project', ref:'Project', mandatory:true,
>> reverse:'Project-phases', readOnly:true }
>>
>>
>>
>>
>>
>> -----Message d'origine-----
>> De : [hidden email] [mailto:[hidden email]] De la
>> part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :
>> [hidden email]
>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>>
>>
>> That's not something that we've worked on yet.  What would you want to see?
>>
>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]>
>> wrote:
>>> Hi
>>>
>>>
>>>
>>> Is it possible to extend the “outline view” to support my groovy DSL ?
>>>
>>> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”,
>>> see here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Maxime
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
I raised this jira:
http://jira.codehaus.org/browse/GRECLIPSE-1029

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts
in the outline view, but it would also be nice to expose an extension
point so that third party plugins can provide their own
JavaOutlinePage input.

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:
> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse+Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSourcefromSVN
>
> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:
>> Hi Maxime,
>>
>> What I'd recommend doing first is checking out the Groovy source code
>> and directly changing the getAdapter method in the GroovyEditor class.
>>
>> Alternatively, you can create your own editor that subclasses the
>> GroovyEditor and then also create your own editor extension in a
>> custom plugin.  This would be a way to test out your idea.  If this is
>> something that is workable, then we can incorporate it directly into
>> Groovy-Eclipse.
>>
>> More importantly, though, I'm not sure if overriding this method is
>> the best way to go.  There is a method called setOutlinePageInput
>> declared in JavaEditor.  Perhaps overriding this method will get you
>> what you need.  I *think* what you need to do is call setInput on some
>> sort of mock IJavaElement that you create and where you populate the
>> getChildren method.  (This is just an idea and I don't know if it will
>> work.)
>>
>> Let me know if you are going to explore this further and we can discuss more.
>>
>>
>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:
>>>
>>> Hello
>>> I think to achieve this i need to override the method "getAdapter" from the
>>> GroovyEditor class... but how can I do that ?
>>> Regards,
>>> Maxime
>>>
>>> -----Message d'origine-----
>>> De : Maxime HAMM [mailto:[hidden email]]
>>> Envoyé : lundi 21 mars 2011 22:32
>>> À : [hidden email]
>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>>>
>>>
>>>
>>> In our DSL, we are using the groovy syntax to specify "beans".
>>> A bean is a method. The first parameter is the bean ID.
>>> In the outline I would like to see all beans... alphabetically sorted...
>>>
>>> See the SJS file bellow... I want to have a liste that will be
>>> - Traceable
>>> - Project
>>> - ReportOperational
>>> ...
>>>
>>> Or eventually... a tree that will show the list of field of each bean...
>>> + Traceable
>>>   - createdTimestamp
>>>   - updatedTimestamp
>>>   - createdBy
>>>   - updatedBy
>>> - Project
>>> - ReportOperational
>>> ...
>>>
>>> /**
>>>  * Traceable
>>>  */
>>> Interface('Traceable',
>>>    interceptors:'TraceableLifecycleInterceptor',
>>>    icon:'traceable-48x48.png',
>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',
>>> 'updatedBy'])
>>> {
>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100
>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,
>>> versionControl:false
>>>
>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120
>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,
>>> versionControl:false }
>>>
>>> /**
>>>  * Project
>>>  */
>>> Entity ('Project',
>>>    icon:'project-32x32.png',
>>>    extension: 'ProjectExtension',
>>>
>>> rendered:['name','mainComment.status','manager','progress','parentProject'],
>>>    services:['ProjectService':'ProjectServiceDelegate'],
>>>    processor:'ProjectPropertyProcessors',
>>>    interceptors:['ProjectLifecycleInterceptor'],
>>>    pageSize:20)
>>> {
>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'
>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',
>>> preferredWidth: 250
>>>  text 'description'
>>>  bool 'active'
>>>  enumeration 'progress', enumName:'project.progress', preferredWidth: 80,
>>> values:['0', '1', '2'] //0=Not started, 1=started, 2=ended
>>>  string_128 'clarityManager'
>>>  html 'specificity', maxLength:8192
>>>  html 'businessPlan', maxLength:8192
>>>  string_32 'jiraId'
>>>
>>>  bool 'selectSTD1', defaultValue:true, processors:['SelectSTDProcessor']
>>>  bool 'selectSTD2', defaultValue:true, processors:['SelectSTDProcessor']
>>>  bool 'selectSTD3', defaultValue:true, processors:['SelectSTDProcessor']
>>>  bool 'selectSTD4', defaultValue:true, processors:['SelectSTDProcessor']
>>>  bool 'selectSTD5', defaultValue:true, processors:['SelectSTDProcessor']
>>>  text 'selectSTDExplanation'
>>>
>>>  // references
>>>  reference 'manager', ref:'User', preferredWidth:100
>>>  reference 'parentProject', ref:'Project', reverse:'Project-subProjects',
>>> processors:'ParentProjectProcessor', preferredWidth: 100
>>>  reference 'projectPhase', ref:'Phase'
>>>
>>>  // sets
>>>  set 'subProjects', composition:true, ref:'Project'
>>>  set 'comments', composition:true, ref:'Comment',
>>> processors:'AddCommentProcessor'
>>>  set 'milestones', composition:true, ref:'Milestone'
>>>  set 'phases', composition:true, ref:'Phase',
>>> processors:'AddCommentProcessor'
>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',
>>> versionControl:false
>>>  set 'reportOperationals', composition:true, ref:'ReportOperational',
>>> processors:['ReportOperationals']
>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'
>>>
>>>  set 'tasks', composition:true, ref:'Task'
>>>  set 'risks', composition:true, ref:'Risk'
>>>  set 'deliveries', composition:true, ref:'Delivery',
>>> id:'Project-deliveries'
>>>
>>>  // computed
>>>  bool 'bookmarked', computed:true
>>>  enumeration 'bookmarkedStatus', computed:true, paramSets:['paramSet.flag']
>>>
>>>  bool 'parentProjectDefined', computed:true
>>>  reference 'managerComment', computed:true, ref:'Comment',
>>> id:'Project-managerComment'
>>>  reference 'mainComment', computed:true, ref:'Comment'
>>>  string_256 'descriptionAsString', computed:true
>>>
>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,
>>> id:'Project-commentHistory'
>>>
>>>  bool 'phase', computed:true
>>>  bool 'includeIn', computed:true, delegateWritable:true
>>>  bool 'includeHp', computed:true, delegateWritable:true
>>>
>>>  reference 'lastReportOperational', ref:'ReportOperational', computed:true
>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true
>>>
>>>  string 'more', computed:true, i18nNameKey:'filter.more'
>>> }
>>>
>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',
>>>    extend:['IReport', 'Traceable'],
>>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>>
>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBean'],
>>>    interceptors:'ReportOperationalLifecycleInterceptor',
>>>    extension: 'ReportOperationalExtension',
>>>    uncloned:['lastReport', 'status', 'year', 'week'],
>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],
>>>    rendered:['project', 'year', 'week', 'comment.status',
>>> 'project.manager', 'project.manager.userGroup.groupId', 'createdTimestamp',
>>> 'updatedTimestamp', 'createdBy', 'updatedBy'],
>>>    toString:'reportDateToString',
>>>    icon:'report-32x32.png',
>>>    pageSize:20)
>>> {
>>>  date 'reportDate'
>>>  integer 'year', preferredWidth: 40, processors:['ReportDateProcessor']
>>>  integer 'week', preferredWidth: 40, processors:['ReportDateProcessor']
>>>
>>>  enumeration 'status', enumName:'reportOperational.status',
>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated
>>>  processors:['ReportOperationalStatus']
>>>
>>>  html 'contributors', maxLength:8192
>>>  html 'workDone', maxLength:8192
>>>  html 'workTodo', maxLength:8192
>>>  html 'questions', maxLength:8192
>>>
>>>  bool 'lastReport'
>>>
>>>  reference 'project', ref:'Project', mandatory:true,
>>> reverse:'Project-reportOperationals', readOnly:true,
>>> processors:['ProjectProcessor']
>>>  set 'riskComments', composition:true, ref:'RiskComment'
>>>  set 'taskComments', composition:true, ref:'TaskComment'
>>>  set 'attachments', ref:'Attachment'
>>>
>>>  //computed
>>>  bool 'validated', computed:true, delegateWritable:true,
>>> i18nNameKey:'reportOperational.status.1'
>>>  //date 'reportDate', computed:true
>>>  string_32 'reportDateToString', computed:true
>>>  reference 'comment', ref:'CommentHistory', computed:true ,
>>> id:'ReportOperational-comment'
>>>  enumeration 'bookmarkedStatus', computed:true,
>>> paramSets:['paramSet.flag'], delegateWritable:true
>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true
>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'
>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'
>>>  bool 'commentHistoryCacheReseted', computed:true, delegateWritable:true }
>>> /**
>>>  * IComment
>>>  */
>>> Interface ('IComment',
>>>    extend:['Traceable'],
>>>    icon:'comment-32x32.png',
>>>    extension: 'ICommentExtension',
>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],
>>>    services: ['org.jspresso.framework.model.component.IComponent':null],
>>>    ordering:['updatedTimestamp':'DESCENDING'],
>>>    toString:'userGroup',
>>>    uncloned:['manager', 'userGroup'],
>>>    pageSize:20)
>>> {
>>>  html 'content', maxLength:8192
>>>  enumeration 'status', mandatory:true, defaultValue:'1',
>>> i18nNameKey:'comment.status', enumName:'comment.status', preferredWidth: 70,
>>>      valuesAndIcons:[
>>>        '1':'sun-89x89.png',
>>>        '2':'sun-cloud-89x89.png',
>>>        '3':'cloud-rain-89x89.png',
>>>        '4':'storm-89x89.png']
>>>
>>>  reference 'userGroup', ref:'UserGroup',
>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120
>>>  reference 'userResponsible', ref:'User', preferredWidth: 120
>>>
>>>  bool 'manager', defaultValue:false
>>>
>>>  // computed
>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl', computed:true
>>>  bool 'editable', computed:true
>>>  bool 'groupEditable', computed:true
>>>  integer 'updatedAge', computed:true, preferredWidth: 30,
>>> sqlName:'UPDATED_TIMESTAMP'
>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,
>>> preferredWidth: 30
>>>
>>>  enumeration 'userKind', enumName:'userKind', computed:true,
>>> preferredWidth: 20, valuesAndIcons:[
>>>        '1':'user-32x32.png',
>>>        '2':'manager-32x32.png']
>>>  reference 'masterComment', ref:'Comment', computed:true
>>>  enumeration 'bookmarkedStatus', computed:true,
>>> paramSets:['paramSet.flag'], delegateWritable:true
>>>  string 'updatedComments', computed:true
>>>  html 'contentAsText', computed:true
>>> }
>>>
>>> /**
>>>  * Comment
>>>  */
>>> Entity ('Comment',
>>>    extend:'IComment',
>>>    extension:'CommentExtension',
>>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>>    rendered:['project', 'userKind', 'status', 'userGroup',
>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',
>>> 'updatedBy'],
>>>    interceptors:'CommentLifecycleInterceptor',
>>>    pageSize:20)
>>> {
>>>  reference 'project', ref:'Project', mandatory:true,
>>> reverse:'Project-comments', id:'Comment-project'
>>>  set 'histories', composition:true, ref:'CommentHistory'
>>>
>>>  set 'otherComments', ref:'Comment', computed:true
>>>
>>>  //
>>>  string 'more', computed:true, i18nNameKey:'filter.more'
>>> }
>>>
>>> /**
>>>  * CommentHistory
>>>  */
>>> Entity ('CommentHistory',
>>>    extend:'IComment',
>>>    rendered:['userKind', 'status', 'userGroup', 'content',
>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],
>>>    pageSize:20)
>>> {
>>>  reference 'comment', ref:'Comment', mandatory:true,
>>> reverse:'Comment-histories'
>>> }
>>>
>>> /**
>>>  * PreferedProject
>>>  */
>>> Entity ('PreferedProject',
>>>    extension:'PreferedProjectExtension',
>>>    extend:['Traceable'],
>>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>>    icon:'bookmark-32x32.png')  {
>>>      reference 'user', ref:'User', mandatory:true,
>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false
>>>      reference 'project', ref:'Project', mandatory:true,
>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',
>>> readOnly:true, versionControl:false
>>>
>>>      enumeration 'flag', mandatory:true, defaultValue:'0',
>>> paramSets:['paramSet.flag']
>>>
>>>      string 'more', computed:true, i18nNameKey:'filter.more'
>>>    }
>>>
>>> /**
>>>  * Milestone
>>>  */
>>> Entity ('Milestone',
>>>    icon:'milestone-32x32.png',
>>>    extension: 'MilestoneExtension',
>>>    services: ['fr.gefco.weather.model.IProjectChild':null],
>>>    ordering:['seqNo':'ASCENDING'],
>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',
>>> 'autoEvaluation.date'])
>>> {
>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'
>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'
>>>  integer     'seqNo', readOnly:true
>>>
>>>  date_time   'realDate', readOnly:true
>>>  integer     'variance', i18nNameKey:'milestone.variance'
>>>  enumeration 'status', enumName:'milestone.status', values:['0', '1', '2']
>>> //0=Not started, 1=started, 2=ended
>>>
>>>  reference 'project', ref:'Project', mandatory:true,
>>> reverse:'Project-milestones', readOnly:true
>>>  reference 'phase', ref:'Phase', readOnly:true
>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,
>>> id:'Milestone-autoEvaluation'
>>>
>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',
>>> composition:false //WARNING:do not set default value composition=true,
>>> Deliveries refers to Project also...
>>>
>>>  // computed
>>>  bool 'autoEvaluated', computed:true
>>> }
>>>
>>> /**
>>>  * Phase
>>>  */
>>> Entity ('Phase',
>>>    ordering:['seqNo':'ASCENDING'],
>>>    rendered:['name', 'status', 'phaseManagement']) {
>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'
>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'
>>>  integer     'seqNo', readOnly:true
>>>
>>>  bool 'phaseManagement', defaultValue:false, grantedRoles:['administrator']
>>>
>>>  enumeration 'status', enumName:'phase.status', values:['0', '1', '2']
>>> //0=Not started, 1=started, 2=ended
>>>
>>>  reference 'project', ref:'Project', mandatory:true,
>>> reverse:'Project-phases', readOnly:true }
>>>
>>>
>>>
>>>
>>>
>>> -----Message d'origine-----
>>> De : [hidden email] [mailto:[hidden email]] De la
>>> part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :
>>> [hidden email]
>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL
>>>
>>>
>>> That's not something that we've worked on yet.  What would you want to see?
>>>
>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM <[hidden email]>
>>> wrote:
>>>> Hi
>>>>
>>>>
>>>>
>>>> Is it possible to extend the “outline view” to support my groovy DSL ?
>>>>
>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named “SJS”,
>>>> see here : http://www.jspresso.org/page/sjs-eclipse-plugin )
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> Maxime
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> 

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

> 

 

Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> 

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

MockMethod.java (4K) Download Attachment
MockTypeRoot.java (28K) Download Attachment
GroovyEditor.java (64K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.
2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.
3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.
4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:
http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

thanks,
--a


On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

patch-0411.patch (36K) Download Attachment
plugin.xml (46K) Download Attachment
outlineExtension.exsd (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Sorry, here it is.

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:17
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

jspresso.zip (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
Thanks for this.  Can you please attach your patch to the jira?  Please create it as a single .patch file with a patch root as the workspace (doing it this way makes the patch directly apply-able through mylyn).  I'll go have a look at it then.

On Sat, Apr 9, 2011 at 4:18 PM, Maxime HAMM <[hidden email]> wrote:

Sorry, here it is.

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:17


À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hello Andrew

I attach my patch to the jira.

Let me know…

Regards,

Maxime

 

PS : nice weather this Sunday in Paris, seems to be summer !

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : dimanche 10 avril 2011 18:00
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Thanks for this.  Can you please attach your patch to the jira?  Please create it as a single .patch file with a patch root as the workspace (doing it this way makes the patch directly apply-able through mylyn).  I'll go have a look at it then.

On Sat, Apr 9, 2011 at 4:18 PM, Maxime HAMM <[hidden email]> wrote:

Sorry, here it is.

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:17


À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email

 

Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
Will do.  Horrendous weather here in Vancouver.  Feels like winter.  :)

On Sun, Apr 10, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

I attach my patch to the jira.

Let me know…

Regards,

Maxime

 

PS : nice weather this Sunday in Paris, seems to be summer !

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : dimanche 10 avril 2011 18:00


À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Thanks for this.  Can you please attach your patch to the jira?  Please create it as a single .patch file with a patch root as the workspace (doing it this way makes the patch directly apply-able through mylyn).  I'll go have a look at it then.

On Sat, Apr 9, 2011 at 4:18 PM, Maxime HAMM <[hidden email]> wrote:

Sorry, here it is.

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:17


À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email

 


Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Maxime HAMM
About tests :
1) test the extension point stuff:
- if there is no extenders then the outline contains the classical methods (main, etc.)
- if there is one extenders that should create an outline O1 then the created outline is an O1 instance. 
- if there is two declared extenders, the first one wins. 
2) test the outline content. 
Let's say we have a test extender that produces an outline that contains a tree of OTypes that should be synchronized with groovy methods and inline methods. Each node contains also OMethod and OField sub nodes linked to the groovy...
- test the outline content consistency
- change one method : test outline content consistency 
- change one line method : test outline content consistency
- remove one method : test outline content consistency
- remove one inline method : test outline content consistency
- add one method : test outline content consistency
- add one inline method : test outline content consistency
- select one IOElement : test selected groovy method consistency 
- select one groovy method : test selected IOElement node

Regards,
Maxime 

Envoyé de mon iPhone

Le 10 avr. 2011 à 23:43, Andrew Eisenberg <[hidden email]> a écrit :

Will do.  Horrendous weather here in Vancouver.  Feels like winter.  :)

On Sun, Apr 10, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

I attach my patch to the jira.

Let me know…

Regards,

Maxime

 

PS : nice weather this Sunday in Paris, seems to be summer !

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : dimanche 10 avril 2011 18:00


À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Thanks for this.  Can you please attach your patch to the jira?  Please create it as a single .patch file with a patch root as the workspace (doing it this way makes the patch directly apply-able through mylyn).  I'll go have a look at it then.

On Sat, Apr 9, 2011 at 4:18 PM, Maxime HAMM <[hidden email]> wrote:

Sorry, here it is.

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:17


À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Here is also my Jspresso extender

I will be glad to share this code to help other developers…

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : dimanche 10 avril 2011 01:08
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

I achieve to develop the extension point, and to test it for my Jspresso DSL :

 

I tried to take in mind your previous mail instructions …  here is some answers :

1.       The groovy editor checks all extenders… the first one that returns an outline page will win... by default (of course) the standard outline page is used.

2.       The extender receives the IProject and the GroovyCompilationUnit.

3.       I added some abstract IJavaElement sub classes… The outline extenders should only inherit this classes and add some methods :

a.       OCompilationUnit.refreshChildren : this method will allow the extender to build and refresh the IOJavaElement tree…

b.      OCompilationUnit.getChildrenAt(int caretOffset) : this method is used to synchronize the Editor view with the outline view…

c.       OMethod.getElementNameNode, OMethod.getReturnTypeName, OType.getElementNameNode : those methods will determine the outline lines labels …
(I have’nt yet implemented a OField classe because I did’nt need it for Jsoresso, but I will do it later)

4.       Here is a first patch proposal… will you give me some feedback first or do you prefer that I attach it directly to the Jira ?

5.       Please give me some instructions to deal with tests…

Regards,

Maxime

http://www.jspresso.org/page/sjs-eclipse-plugin

 

<image001.jpg>

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 05:23
À : Maxime HAMM; [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

No, it's not too complicated and you can copy the code used for other extension points inside of Groovy-Eclipse (such as HighlightingExtenderRegistry), but there are some things that you would need to think about:

 

1. There may be multiple extenders, how will they interact?  If you make sure that each extender registers for a particular file type (or some other reasonable thing), then there would be little chance that one extender would interfere with another.

2. The groovy editor will need to be able to efficiently determine which extension to use.  This is related to the previous comment.

3. It would be nice if extenders wouldn't have to create their own subclass of ITypeRoot.  I think that MockTypeRoot (or something more appropriately named) should be part of Groovy-Eclipse, but that it should expose callbacks that extenders should use to create children.  Similarly, instead of requiring extenders to sub-class SourceMethod (or SourceField), Groovy-Eclipse should provide default implementations with similar callbacks.

4. It would be easiest to manage the code if you were to create a patch based off of what is currently in trunk and then attach it to the jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029
5. As for test cases, I can point you to some of the testing infrastructure that we already have which you can use to create some tests.

 

thanks,

--a

 

 

On Sun, Apr 3, 2011 at 3:28 PM, Maxime HAMM <[hidden email]> wrote:

Hello Andrew

Thank you for answering so quickly !

In fact this is just some rough code to confirm that i can achieve what I need to do…

I can try to do the extension point stuff and the tests also… I didn’t try (yet) to create an extension point… I never do that, may be it’s not too complicated ?

Regards,

Maxime

 

De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : lundi 4 avril 2011 00:19


À : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hey,

 

That's very cool.  I'll take a look at this on Monday.  Can you post your sample code to the jira issue I raised earlier?

 

There are some questions that I have and would need to discuss before moving ahead with this.  But, if the patch is well coded and has some tests, then we can definitely incorporate this into the code-base.

On Sun, Apr 3, 2011 at 1:50 PM, Maxime HAMM <[hidden email]> wrote:

Hi Andrew

 

It works !

 

I did it like you suggest me… I just override one more method to synchronize the outline view with the selected text.

 

What can be the next step ? Can we imagine adding a new extension point ?

Here is the two methods I suggest for this extension point :

-          public ITypeRoot getInputJavaElement();

-          public  ISourceReference getElementForOutlinePageSynchronization

 

Regards

Maxime

 

De : Maxime HAMM [mailto:[hidden email]]
Envoyé : samedi 2 avril 2011 14:05
À : [hidden email]; [hidden email]


Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

Hi Andrew

Yesterday evening I succeed to replace the outline view by two mocked IJavaElements, this is a first step !

I will continue to investigate : how to link some ASTNode to the IJavaElement mock instance… how to synchronize the Editor content with the outline items… how to replace the outline icons, etc.

Thank you for your help !

Maxime

 

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De l
a part de Andrew Eisenberg
Envoyé : vendredi 1 avril 2011 19:02
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

 

 

I raised this jira:

http://jira.codehaus.org/browse/GRECLIPSE-1029

 

At a minimum, Groovy-Eclipse should be able to augment Groovy scripts in the outline view, but it would also be nice to expose an extension point so that third party plugins can provide their own JavaOutlinePage input.

 

On Tue, Mar 29, 2011 at 1:32 PM, Andrew Eisenberg <[hidden email]> wrote:

> Here is some information about checking out the groovy-eclipse source code:

> http://docs.codehaus.org/display/GROOVY/Getting+Started+With+Greclipse

> +Source+Code#GettingStartedWithGreclipseSourceCode-Step5%3ACheckoutSou

> rcefromSVN

> On Tue, Mar 29, 2011 at 1:19 PM, Andrew Eisenberg <[hidden email]> wrote:

>> Hi Maxime,

>> 

>> What I'd recommend doing first is checking out the Groovy source code

>> and directly changing the getAdapter method in the GroovyEditor class.

>> 

>> Alternatively, you can create your own editor that subclasses the

>> GroovyEditor and then also create your own editor extension in a

>> custom plugin.  This would be a way to test out your idea.  If this

>> is something that is workable, then we can incorporate it directly

>> into Groovy-Eclipse.

>> 

>> More importantly, though, I'm not sure if overriding this method is

>> the best way to go.  There is a method called setOutlinePageInput

>> declared in JavaEditor.  Perhaps overriding this method will get you

>> what you need.  I *think* what you need to do is call setInput on

>> some sort of mock IJavaElement that you create and where you populate

>> the getChildren method.  (This is just an idea and I don't know if it

>> will

>> work.)

>> 

>> Let me know if you are going to explore this further and we can discuss more.

>> 

>> 

>> On Tue, Mar 29, 2011 at 12:39 PM, Maxime HAMM <[hidden email]> wrote:

>>> 

>>> Hello

>>> I think to achieve this i need to override the method "getAdapter"

>>> from the GroovyEditor class... but how can I do that ?

>>> Regards,

>>> Maxime

>>> 

>>> -----Message d'origine-----

>>> De : Maxime HAMM [mailto:[hidden email]] Envoyé : lundi 21

>>> mars 2011 22:32 À : [hidden email]

>>> Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> 

>>> In our DSL, we are using the groovy syntax to specify "beans".

>>> A bean is a method. The first parameter is the bean ID.

>>> In the outline I would like to see all beans... alphabetically sorted...

>>> 

>>> See the SJS file bellow... I want to have a liste that will be

>>> - Traceable

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> Or eventually... a tree that will show the list of field of each bean...

>>> + Traceable

>>>   - createdTimestamp

>>>   - updatedTimestamp

>>>   - createdBy

>>>   - updatedBy

>>> - Project

>>> - ReportOperational

>>> ...

>>> 

>>> /**

>>>  * Traceable

>>>  */

>>> Interface('Traceable',

>>>    interceptors:'TraceableLifecycleInterceptor',

>>>    icon:'traceable-48x48.png',

>>>    uncloned:['createdTimestamp', 'updatedTimestamp', 'createdBy',

>>> 'updatedBy'])

>>> {

>>>  date_time 'createdTimestamp', readOnly:true, preferredWidth: 100

>>>  date_time 'updatedTimestamp', readOnly:true, preferredWidth: 100,

>>> versionControl:false

>>> 

>>>  string_32 'createdBy', readOnly:true, preferredWidth: 120

>>>  string_32 'updatedBy', readOnly:true, preferredWidth: 120,

>>> versionControl:false }

>>> 

>>> /**

>>>  * Project

>>>  */

>>> Entity ('Project',

>>>    icon:'project-32x32.png',

>>>    extension: 'ProjectExtension',

>>> 

>>> rendered:['name','mainComment.status','manager','progress','parentPr

>>> oject'],

>>>    services:['ProjectService':'ProjectServiceDelegate'],

>>>    processor:'ProjectPropertyProcessors',

>>>    interceptors:['ProjectLifecycleInterceptor'],

>>>    pageSize:20)

>>> {

>>>  string_32 'projectId', mandatory:true, unicityScope:'projectId'

>>>  string_128 'name', mandatory:true, i18nNameKey:'project.name',

>>> preferredWidth: 250

>>>  text 'description'

>>>  bool 'active'

>>>  enumeration 'progress', enumName:'project.progress',

>>> preferredWidth: 80, values:['0', '1', '2'] //0=Not started,

>>> 1=started, 2=ended

>>>  string_128 'clarityManager'

>>>  html 'specificity', maxLength:8192

>>>  html 'businessPlan', maxLength:8192

>>>  string_32 'jiraId'

>>> 

>>>  bool 'selectSTD1', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD2', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD3', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD4', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  bool 'selectSTD5', defaultValue:true,

>>> processors:['SelectSTDProcessor']

>>>  text 'selectSTDExplanation'

>>> 

>>>  // references

>>>  reference 'manager', ref:'User', preferredWidth:100

>>>  reference 'parentProject', ref:'Project',

>>> reverse:'Project-subProjects', processors:'ParentProjectProcessor',

>>> preferredWidth: 100

>>>  reference 'projectPhase', ref:'Phase'

>>> 

>>>  // sets

>>>  set 'subProjects', composition:true, ref:'Project'

>>>  set 'comments', composition:true, ref:'Comment',

>>> processors:'AddCommentProcessor'

>>>  set 'milestones', composition:true, ref:'Milestone'

>>>  set 'phases', composition:true, ref:'Phase',

>>> processors:'AddCommentProcessor'

>>>  set 'preferedProjects', composition:true, ref:'PreferedProject',

>>> versionControl:false

>>>  set 'reportOperationals', composition:true,

>>> ref:'ReportOperational', processors:['ReportOperationals']

>>>  set 'reportSteerings', composition:true, ref:'ReportSteering'

>>> 

>>>  set 'tasks', composition:true, ref:'Task'

>>>  set 'risks', composition:true, ref:'Risk'

>>>  set 'deliveries', composition:true, ref:'Delivery',

>>> id:'Project-deliveries'

>>> 

>>>  // computed

>>>  bool 'bookmarked', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag']

>>> 

>>>  bool 'parentProjectDefined', computed:true

>>>  reference 'managerComment', computed:true, ref:'Comment',

>>> id:'Project-managerComment'

>>>  reference 'mainComment', computed:true, ref:'Comment'

>>>  string_256 'descriptionAsString', computed:true

>>> 

>>>  reference 'commentHistory', ref:'CommentHistories', computed:true,

>>> id:'Project-commentHistory'

>>> 

>>>  bool 'phase', computed:true

>>>  bool 'includeIn', computed:true, delegateWritable:true

>>>  bool 'includeHp', computed:true, delegateWritable:true

>>> 

>>>  reference 'lastReportOperational', ref:'ReportOperational',

>>> computed:true

>>>  reference 'lastReportSteering', ref:'ReportSteering', computed:true

>>> 

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> Entity ('ReportOperational', processor:'ReportOperationalProcessor',

>>>    extend:['IReport', 'Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>> 

>>> serviceBeans:['ReportOperationalService':'ReportOperationalServiceBe

>>> an'],

>>>    interceptors:'ReportOperationalLifecycleInterceptor',

>>>    extension: 'ReportOperationalExtension',

>>>    uncloned:['lastReport', 'status', 'year', 'week'],

>>>    ordering:['year':'DESCENDING', 'week':'DESCENDING'],

>>>    rendered:['project', 'year', 'week', 'comment.status',

>>> 'project.manager', 'project.manager.userGroup.groupId',

>>> 'createdTimestamp', 'updatedTimestamp', 'createdBy', 'updatedBy'],

>>>    toString:'reportDateToString',

>>>    icon:'report-32x32.png',

>>>    pageSize:20)

>>> {

>>>  date 'reportDate'

>>>  integer 'year', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>>  integer 'week', preferredWidth: 40,

>>> processors:['ReportDateProcessor']

>>> 

>>>  enumeration 'status', enumName:'reportOperational.status',

>>> defaultValue:'0', values:['0', '1'], //0=Temp, 1=Validated

>>>  processors:['ReportOperationalStatus']

>>> 

>>>  html 'contributors', maxLength:8192

>>>  html 'workDone', maxLength:8192

>>>  html 'workTodo', maxLength:8192

>>>  html 'questions', maxLength:8192

>>> 

>>>  bool 'lastReport'

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-reportOperationals', readOnly:true,

>>> processors:['ProjectProcessor']

>>>  set 'riskComments', composition:true, ref:'RiskComment'

>>>  set 'taskComments', composition:true, ref:'TaskComment'

>>>  set 'attachments', ref:'Attachment'

>>> 

>>>  //computed

>>>  bool 'validated', computed:true, delegateWritable:true,

>>> i18nNameKey:'reportOperational.status.1'

>>>  //date 'reportDate', computed:true

>>>  string_32 'reportDateToString', computed:true

>>>  reference 'comment', ref:'CommentHistory', computed:true ,

>>> id:'ReportOperational-comment'

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  html 'reportFullAsHtml', computed:true, delegateWritable:true

>>>  set 'taskCommentsInProgress', computed:true, ref:'TaskComment'

>>>  set 'taskCommentsFinished', computed:true, ref:'TaskComment'

>>>  bool 'commentHistoryCacheReseted', computed:true,

>>> delegateWritable:true }

>>> /**

>>>  * IComment

>>>  */

>>> Interface ('IComment',

>>>    extend:['Traceable'],

>>>    icon:'comment-32x32.png',

>>>    extension: 'ICommentExtension',

>>>    serviceBeans:['ICommentService':'ICommentServiceBean'],

>>>    services:

>>> ['org.jspresso.framework.model.component.IComponent':null],

>>>    ordering:['updatedTimestamp':'DESCENDING'],

>>>    toString:'userGroup',

>>>    uncloned:['manager', 'userGroup'],

>>>    pageSize:20)

>>> {

>>>  html 'content', maxLength:8192

>>>  enumeration 'status', mandatory:true, defaultValue:'1',

>>> i18nNameKey:'comment.status', enumName:'comment.status',

>>> preferredWidth: 70,

>>>      valuesAndIcons:[

>>>        '1':'sun-89x89.png',

>>>        '2':'sun-cloud-89x89.png',

>>>        '3':'cloud-rain-89x89.png',

>>>        '4':'storm-89x89.png']

>>> 

>>>  reference 'userGroup', ref:'UserGroup',

>>> booleanWritabilityGates:['groupEditable'], preferredWidth: 120

>>>  reference 'userResponsible', ref:'User', preferredWidth: 120

>>> 

>>>  bool 'manager', defaultValue:false

>>> 

>>>  // computed

>>>  string_512 'statusImageUrl', id:'Comment-statusImageUrl',

>>> computed:true

>>>  bool 'editable', computed:true

>>>  bool 'groupEditable', computed:true

>>>  integer 'updatedAge', computed:true, preferredWidth: 30,

>>> sqlName:'UPDATED_TIMESTAMP'

>>>  string 'updatedAgeForQuery', computed:true, delegateWritable:true,

>>> preferredWidth: 30

>>> 

>>>  enumeration 'userKind', enumName:'userKind', computed:true,

>>> preferredWidth: 20, valuesAndIcons:[

>>>        '1':'user-32x32.png',

>>>        '2':'manager-32x32.png']

>>>  reference 'masterComment', ref:'Comment', computed:true

>>>  enumeration 'bookmarkedStatus', computed:true,

>>> paramSets:['paramSet.flag'], delegateWritable:true

>>>  string 'updatedComments', computed:true

>>>  html 'contentAsText', computed:true }

>>> 

>>> /**

>>>  * Comment

>>>  */

>>> Entity ('Comment',

>>>    extend:'IComment',

>>>    extension:'CommentExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    rendered:['project', 'userKind', 'status', 'userGroup',

>>> 'userResponsible', 'updatedBy', 'updatedAge', 'updatedTimestamp',

>>> 'updatedBy'],

>>>    interceptors:'CommentLifecycleInterceptor',

>>>    pageSize:20)

>>> {

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-comments', id:'Comment-project'

>>>  set 'histories', composition:true, ref:'CommentHistory'

>>> 

>>>  set 'otherComments', ref:'Comment', computed:true

>>> 

>>>  //

>>>  string 'more', computed:true, i18nNameKey:'filter.more'

>>> }

>>> 

>>> /**

>>>  * CommentHistory

>>>  */

>>> Entity ('CommentHistory',

>>>    extend:'IComment',

>>>    rendered:['userKind', 'status', 'userGroup', 'content',

>>> 'userResponsible', 'createdBy', 'createdTimestamp', 'createdBy'],

>>>    pageSize:20)

>>> {

>>>  reference 'comment', ref:'Comment', mandatory:true,

>>> reverse:'Comment-histories'

>>> }

>>> 

>>> /**

>>>  * PreferedProject

>>>  */

>>> Entity ('PreferedProject',

>>>    extension:'PreferedProjectExtension',

>>>    extend:['Traceable'],

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    icon:'bookmark-32x32.png')  {

>>>      reference 'user', ref:'User', mandatory:true,

>>> reverse:'User-preferedProjects', readOnly:true, versionControl:false

>>>      reference 'project', ref:'Project', mandatory:true,

>>> id:'PreferedProject-project', reverse:'Project-preferedProjects',

>>> readOnly:true, versionControl:false

>>> 

>>>      enumeration 'flag', mandatory:true, defaultValue:'0',

>>> paramSets:['paramSet.flag']

>>> 

>>>      string 'more', computed:true, i18nNameKey:'filter.more'

>>>    }

>>> 

>>> /**

>>>  * Milestone

>>>  */

>>> Entity ('Milestone',

>>>    icon:'milestone-32x32.png',

>>>    extension: 'MilestoneExtension',

>>>    services: ['fr.gefco.weather.model.IProjectChild':null],

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['realDate', 'phase.name', 'name', 'status', 'variance',

>>> 'autoEvaluation.date'])

>>> {

>>>  string_32   'milestoneId', mandatory:true, unicityScope:'milestoneId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'milestone.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  date_time   'realDate', readOnly:true

>>>  integer     'variance', i18nNameKey:'milestone.variance'

>>>  enumeration 'status', enumName:'milestone.status', values:['0',

>>> '1', '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-milestones', readOnly:true

>>>  reference 'phase', ref:'Phase', readOnly:true

>>>  reference 'autoEvaluation', ref:'AutoEvaluation', composition:true,

>>> id:'Milestone-autoEvaluation'

>>> 

>>>  set 'deliveries', ref:'Delivery', id:'Milestone-deliveries',

>>> composition:false //WARNING:do not set default value

>>> composition=true, Deliveries refers to Project also...

>>> 

>>>  // computed

>>>  bool 'autoEvaluated', computed:true }

>>> 

>>> /**

>>>  * Phase

>>>  */

>>> Entity ('Phase',

>>>    ordering:['seqNo':'ASCENDING'],

>>>    rendered:['name', 'status', 'phaseManagement']) {

>>>  string_32   'phaseId', mandatory:true, unicityScope:'phaseId'

>>>  string_128  'name', readOnly:true, i18nNameKey:'phase.name'

>>>  integer     'seqNo', readOnly:true

>>> 

>>>  bool 'phaseManagement', defaultValue:false,

>>> grantedRoles:['administrator']

>>> 

>>>  enumeration 'status', enumName:'phase.status', values:['0', '1',

>>> '2'] //0=Not started, 1=started, 2=ended

>>> 

>>>  reference 'project', ref:'Project', mandatory:true,

>>> reverse:'Project-phases', readOnly:true }

>>> 

>>> 

>>> 

>>> 

>>> 

>>> -----Message d'origine-----

>>> De : [hidden email] [mailto:[hidden email]]

>>> De la part de Andrew Eisenberg Envoyé : lundi 21 mars 2011 22:18 À :

>>> [hidden email]

>>> Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL

>>> 

>>> 

>>> That's not something that we've worked on yet.  What would you want to see?

>>> 

>>> On Mon, Mar 21, 2011 at 2:02 PM, Maxime HAMM

>>> <[hidden email]>

>>> wrote:

>>>> Hi

>>>> 

>>>> 

>>>> 

>>>> Is it possible to extend the “outline view” to support my groovy DSL ?

>>>> 

>>>> (I’m developing the plugin for the Jspresso’s groovy DSL named

>>>> “SJS”, see here : http://www.jspresso.org/page/sjs-eclipse-plugin )

>>>> 

>>>> 

>>>> 

>>>> Regards,

>>>> 

>>>> 

>>>> 

>>>> Maxime

>>>> 

>>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>>> 

>>> 

>>> 

>>> --------------------------------------------------------------------

>>> - To unsubscribe from this list, please visit:

>>> 

>>>    http://xircles.codehaus.org/manage_email

>>> 

>>> 

>>> 

>> 

Ø                

 

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email

 


Reply | Threaded
Open this post in threaded view
|

Re: Outline view for Groovy DSL

Andrew Eisenberg
Please see my comments on the jira issue.

http://jira.codehaus.org/browse/GRECLIPSE-1029

On Mon, Apr 11, 2011 at 12:00 AM, Maxime HAMM <[hidden email]> wrote:

> About tests :
> 1) test the extension point stuff:
> - if there is no extenders then the outline contains the classical methods
> (main, etc.)
> - if there is one extenders that should create an outline O1 then the
> created outline is an O1 instance.
> - if there is two declared extenders, the first one wins.
> 2) test the outline content.
> Let's say we have a test extender that produces an outline that contains a
> tree of OTypes that should be synchronized with groovy methods and inline
> methods. Each node contains also OMethod and OField sub nodes linked to the
> groovy...
> - test the outline content consistency
> - change one method : test outline content consistency
> - change one line method : test outline content consistency
> - remove one method : test outline content consistency
> - remove one inline method : test outline content consistency
> - add one method : test outline content consistency
> - add one inline method : test outline content consistency
> - select one IOElement : test selected groovy method consistency
> - select one groovy method : test selected IOElement node
> Regards,
> Maxime

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Hello
I post my new code, extension point and extension point tests. See the Jira
please.
Thank you !
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : lundi 11 avril 2011 17:57
À : [hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL


Please see my comments on the jira issue.

http://jira.codehaus.org/browse/GRECLIPSE-1029

On Mon, Apr 11, 2011 at 12:00 AM, Maxime HAMM <[hidden email]>
wrote:

> About tests :
> 1) test the extension point stuff:
> - if there is no extenders then the outline contains the classical
> methods (main, etc.)
> - if there is one extenders that should create an outline O1 then the
> created outline is an O1 instance.
> - if there is two declared extenders, the first one wins.
> 2) test the outline content.
> Let's say we have a test extender that produces an outline that
> contains a tree of OTypes that should be synchronized with groovy
> methods and inline methods. Each node contains also OMethod and OField
> sub nodes linked to the groovy...
> - test the outline content consistency
> - change one method : test outline content consistency
> - change one line method : test outline content consistency
> - remove one method : test outline content consistency
> - remove one inline method : test outline content consistency
> - add one method : test outline content consistency
> - add one inline method : test outline content consistency
> - select one IOElement : test selected groovy method consistency
> - select one groovy method : test selected IOElement node Regards,
> Maxime

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Outline view for Groovy DSL

Maxime HAMM

Please, look my answer into the Jira !

-----Message d'origine-----
De : Maxime HAMM [mailto:[hidden email]]
Envoyé : mercredi 13 avril 2011 00:07
À : [hidden email]
Objet : RE: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL



Hello
I post my new code, extension point and extension point tests. See the Jira
please.
Thank you !
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg Envoyé : lundi 11 avril 2011 17:57 À :
[hidden email]
Cc : Maxime HAMM
Objet : Re: [groovy-eclipse-plugin-dev] Outline view for Groovy DSL


Please see my comments on the jira issue.

http://jira.codehaus.org/browse/GRECLIPSE-1029

On Mon, Apr 11, 2011 at 12:00 AM, Maxime HAMM <[hidden email]>
wrote:

> About tests :
> 1) test the extension point stuff:
> - if there is no extenders then the outline contains the classical
> methods (main, etc.)
> - if there is one extenders that should create an outline O1 then the
> created outline is an O1 instance.
> - if there is two declared extenders, the first one wins.
> 2) test the outline content.
> Let's say we have a test extender that produces an outline that
> contains a tree of OTypes that should be synchronized with groovy
> methods and inline methods. Each node contains also OMethod and OField
> sub nodes linked to the groovy...
> - test the outline content consistency
> - change one method : test outline content consistency
> - change one line method : test outline content consistency
> - remove one method : test outline content consistency
> - remove one inline method : test outline content consistency
> - add one method : test outline content consistency
> - add one inline method : test outline content consistency
> - select one IOElement : test selected groovy method consistency
> - select one groovy method : test selected IOElement node Regards,
> Maxime

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email