Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Contextual Launching Migration Guide?
Contextual Launching Migration Guide? [message #315841] Wed, 23 May 2007 17:12 Go to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

Hi Everyone,

Is there a migration guide for contextual launching somewhere? I have =

found the docs in CVS =

(dev.eclipse.org:/cvsroot/org.eclipse/www/eclipse/debug/docu ments/launch=
ing) =

as well as the bug report =

(https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D74480) but I am still a=
=

little mystified as to why our launches now fail with an error message 9=
=

times out of 10. Also - we are associating our launch configurations wi=
th =

resources but they do not show up in the Run/Debug Settings properties =

page at all. Do we need to do something special to see them here?

Any pointers would be helpful. I'm assuming the two issues are related =
=

and we are not doing something right.

Thanks,
Mark.
Re: Contextual Launching Migration Guide? [message #315896 is a reply to message #315841] Thu, 24 May 2007 16:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

I did eventually find the magic bit that makes our shortcuts appear in t=
he =

properties page. You need to specify the <configurationType> subelement=
=

on your launch shortcut declaration.

I think the rest of the "smarts" needs to be implemented by me by openin=
g =

up the <enablement> part of my <contextualLaunch> subelement and then =

doing a little more heavy lifting in my launch(..) methods to pick out =

potential candidates.

M.

On Wed, 23 May 2007 17:12:12 -0400, Mark Melvin <mark_melvin@amis.com> =

wrote:

> Hi Everyone,
>
> Is there a migration guide for contextual launching somewhere? I have=
=

> found the docs in CVS =

> (dev.eclipse.org:/cvsroot/org.eclipse/www/eclipse/debug/docu ments/laun=
ching) =

> as well as the bug report =

> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D74480) but I am still=
a =

> little mystified as to why our launches now fail with an error message=
9 =

> times out of 10. Also - we are associating our launch configurations =
=

> with resources but they do not show up in the Run/Debug Settings =

> properties page at all. Do we need to do something special to see the=
m =

> here?
>
> Any pointers would be helpful. I'm assuming the two issues are relate=
d =

> and we are not doing something right.
>
> Thanks,
> Mark.
Re: Contextual Launching Migration Guide? [message #315898 is a reply to message #315841] Thu, 24 May 2007 16:40 Go to previous messageGo to next message
Eclipse UserFriend
I'm still working on the migration guide. So far, it's a work in progress in
the buildnotes_platform-debug.html file:
Changes required when adopting 3.3 mechanisms and APIs
Launching Selected Resource vs. Launch Last

By default, running and debugging applications has been simplified to run or
debug the selected file or active editor. When the selected resource (or
active editor) is not executable, users can opt to launch the associated
project or re-launch the previous launch. These settings are managed on the
Run/Debug > Launching preference page. Users can also revert to the 3.2
behavior of always launching the previous application.

Pressing the Run or Debug toolbar button will launch the selected resource
(as will the Run or Debug action in the top level Run menu). When no launch
configuration exists for a file and there is only one way to launch it, the
file will simply be launched in the mode selected. When there is more than
one way to launch a file, the user will be prompted to select how to run or
debug the application. For example, when running a JUnit test it can be run
as a Java application or JUnit test. A launch configuration will be created
and an entry will be added to the launch history for the application. When
the same resource is launched again, it will use the most recent
configuration in the launch history associated with that resource.

The underlying infrastructure for selection based launching relies on the
launch shortcuts applicable to a resource (or editor) and the resource
mappings associated with existing launch configurations. As well, API (a new
extension element) has been added to the launchShortcuts extension to
associate a launch shortcut with one or more types of launch configurations.
For example, this tells the platform that the "Java Application" launch
shortcut is associated with "Java Application" launch configurations.

The contextual launch support uses the following approach to determine how a
selection or active editor should be launched.

1.. An IResource adapter is retrieved from the selection or active editor
(which can be null).
2.. A set of applicable launch configuration types are computed from the
set of launch shortcuts applicable to the selection/editor (using the new
launch configuration type elements defined by launch shortcuts).
3.. A set of applicable launch configurations is computed based on the
launch configuration types applicable to the selection/editor and the
existing launch configurations in the workspace.
4.. The set of applicable launch configurations is reduced to those that
have a resource mapping equal to or contained by the retrieved resource
adapter
5.. The set of applicable launch configurations is compared to the launch
history and the most recently launched configuration in the set is selected
for launching.
6.. When there are applicable launch configurations, but none are in the
recent launch history, the user is prompted to select one of the applicable
configurations to launch.
7.. When there are applicable launch shortcuts and no applicable launch
configurations, the user is prompted on how they want to launch the
selection (i.e. which shortcut they want to use).
When there are no applicable launch configurations or launch shortcuts, the
platform either attempts to launch the associated project or launches last,
based on user preference settings. When the user has chosen to launch the
associated project, the same steps as above are followed, except the
resource used is the project.

For selection based launching to work well, plug-in providers should ensure
the following.

1.. Resource mappings for launch configurations should be scoped to the
appropriate resource. For example, to support projects with multiple Java
executables, Java application launch configurations are associated with the
the .java file containing the main class.
2.. Launch shortcut extensions should be updated with configurationType
elements so the platform can infer which launch configuration types to
consider when resolving launch configurations applicable to a
selection/editor.
3.. Launch configuration migration delegates should be updated to create
appropriate resource mappings for existing launch configurations. For
example, if launch your launch configuration resource mappings in 3.2 were
always associated with a project, but now you want to associated them with
specific files in a project to better support context launching, your
migration delegate should be updated to update resource mappings.
Re: Contextual Launching Migration Guide? [message #315922 is a reply to message #315898] Fri, 25 May 2007 09:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

Thanks, Darin. This helps a lot.

Mark.

On Thu, 24 May 2007 16:40:44 -0400, Darin Wright <Darin_Wright@ca.ibm.com>
wrote:

> I'm still working on the migration guide. So far, it's a work in
> progress in
> the buildnotes_platform-debug.html file:
> Changes required when adopting 3.3 mechanisms and APIs
> Launching Selected Resource vs. Launch Last
>
> By default, running and debugging applications has been simplified to
> run or
> debug the selected file or active editor. When the selected resource (or
> active editor) is not executable, users can opt to launch the associated
> project or re-launch the previous launch. These settings are managed on
> the
> Run/Debug > Launching preference page. Users can also revert to the 3.2
> behavior of always launching the previous application.
>
> Pressing the Run or Debug toolbar button will launch the selected
> resource
> (as will the Run or Debug action in the top level Run menu). When no
> launch
> configuration exists for a file and there is only one way to launch it,
> the
> file will simply be launched in the mode selected. When there is more
> than
> one way to launch a file, the user will be prompted to select how to run
> or
> debug the application. For example, when running a JUnit test it can be
> run
> as a Java application or JUnit test. A launch configuration will be
> created
> and an entry will be added to the launch history for the application.
> When
> the same resource is launched again, it will use the most recent
> configuration in the launch history associated with that resource.
>
> The underlying infrastructure for selection based launching relies on the
> launch shortcuts applicable to a resource (or editor) and the resource
> mappings associated with existing launch configurations. As well, API (a
> new
> extension element) has been added to the launchShortcuts extension to
> associate a launch shortcut with one or more types of launch
> configurations.
> For example, this tells the platform that the "Java Application" launch
> shortcut is associated with "Java Application" launch configurations.
>
> The contextual launch support uses the following approach to determine
> how a
> selection or active editor should be launched.
>
> 1.. An IResource adapter is retrieved from the selection or active
> editor
> (which can be null).
> 2.. A set of applicable launch configuration types are computed from
> the
> set of launch shortcuts applicable to the selection/editor (using the new
> launch configuration type elements defined by launch shortcuts).
> 3.. A set of applicable launch configurations is computed based on the
> launch configuration types applicable to the selection/editor and the
> existing launch configurations in the workspace.
> 4.. The set of applicable launch configurations is reduced to those
> that
> have a resource mapping equal to or contained by the retrieved resource
> adapter
> 5.. The set of applicable launch configurations is compared to the
> launch
> history and the most recently launched configuration in the set is
> selected
> for launching.
> 6.. When there are applicable launch configurations, but none are in
> the
> recent launch history, the user is prompted to select one of the
> applicable
> configurations to launch.
> 7.. When there are applicable launch shortcuts and no applicable launch
> configurations, the user is prompted on how they want to launch the
> selection (i.e. which shortcut they want to use).
> When there are no applicable launch configurations or launch shortcuts,
> the
> platform either attempts to launch the associated project or launches
> last,
> based on user preference settings. When the user has chosen to launch the
> associated project, the same steps as above are followed, except the
> resource used is the project.
>
> For selection based launching to work well, plug-in providers should
> ensure
> the following.
>
> 1.. Resource mappings for launch configurations should be scoped to the
> appropriate resource. For example, to support projects with multiple Java
> executables, Java application launch configurations are associated with
> the
> the .java file containing the main class.
> 2.. Launch shortcut extensions should be updated with configurationType
> elements so the platform can infer which launch configuration types to
> consider when resolving launch configurations applicable to a
> selection/editor.
> 3.. Launch configuration migration delegates should be updated to
> create
> appropriate resource mappings for existing launch configurations. For
> example, if launch your launch configuration resource mappings in 3.2
> were
> always associated with a project, but now you want to associated them
> with
> specific files in a project to better support context launching, your
> migration delegate should be updated to update resource mappings.
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Contextual Launching Migration Guide? [message #315938 is a reply to message #315898] Fri, 25 May 2007 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

Hi Darin,

I have one last question. I seem to have this all working reasonably well
now except for one particular launch type that we have. It is a launch
configuration type (and corresponding shortcut) that only supports the
"run" mode. When I select a launchable resource of this type and choose
Run, it launches it just fine. However, when I select the same resource
and choose Debug (which our users will definitely end up doing) - I get
the edit launch configuration dialog coming up with an error message that
says "Mixed launch mode not supported: [Debug]", but the "Debug" button is
disabled and there is basically nothing I can do in this situation at all
except cancel the dialog. There is a link at the bottom of this page that
says "Select a support launch mode." - which is clickable. But if I click
it I just get an empty dialog as there are no supported "mode
combinations" (whatever those are).

I would rather have a dialog come up and tell me this launch mode is
simply not supported, or nothing to happen at all. Having this dialog
come up in which I cannot do anything is kind of pointless and very
confusing.

I'm assuming this is a bug? If so I will file one with more details and a
screenshot. Otherwise, if I need to do something else to turn odd mixed
mode launch support - what can I do? My launches are pretty standard
vanilla launches that worked fine on Eclipse 3.2.x.

Mark.


On Thu, 24 May 2007 16:40:44 -0400, Darin Wright <Darin_Wright@ca.ibm.com>
wrote:

> I'm still working on the migration guide. So far, it's a work in
> progress in
> the buildnotes_platform-debug.html file:
> Changes required when adopting 3.3 mechanisms and APIs
> Launching Selected Resource vs. Launch Last
>
> By default, running and debugging applications has been simplified to
> run or
> debug the selected file or active editor. When the selected resource (or
> active editor) is not executable, users can opt to launch the associated
> project or re-launch the previous launch. These settings are managed on
> the
> Run/Debug > Launching preference page. Users can also revert to the 3.2
> behavior of always launching the previous application.
>
> Pressing the Run or Debug toolbar button will launch the selected
> resource
> (as will the Run or Debug action in the top level Run menu). When no
> launch
> configuration exists for a file and there is only one way to launch it,
> the
> file will simply be launched in the mode selected. When there is more
> than
> one way to launch a file, the user will be prompted to select how to run
> or
> debug the application. For example, when running a JUnit test it can be
> run
> as a Java application or JUnit test. A launch configuration will be
> created
> and an entry will be added to the launch history for the application.
> When
> the same resource is launched again, it will use the most recent
> configuration in the launch history associated with that resource.
>
> The underlying infrastructure for selection based launching relies on the
> launch shortcuts applicable to a resource (or editor) and the resource
> mappings associated with existing launch configurations. As well, API (a
> new
> extension element) has been added to the launchShortcuts extension to
> associate a launch shortcut with one or more types of launch
> configurations.
> For example, this tells the platform that the "Java Application" launch
> shortcut is associated with "Java Application" launch configurations.
>
> The contextual launch support uses the following approach to determine
> how a
> selection or active editor should be launched.
>
> 1.. An IResource adapter is retrieved from the selection or active
> editor
> (which can be null).
> 2.. A set of applicable launch configuration types are computed from
> the
> set of launch shortcuts applicable to the selection/editor (using the new
> launch configuration type elements defined by launch shortcuts).
> 3.. A set of applicable launch configurations is computed based on the
> launch configuration types applicable to the selection/editor and the
> existing launch configurations in the workspace.
> 4.. The set of applicable launch configurations is reduced to those
> that
> have a resource mapping equal to or contained by the retrieved resource
> adapter
> 5.. The set of applicable launch configurations is compared to the
> launch
> history and the most recently launched configuration in the set is
> selected
> for launching.
> 6.. When there are applicable launch configurations, but none are in
> the
> recent launch history, the user is prompted to select one of the
> applicable
> configurations to launch.
> 7.. When there are applicable launch shortcuts and no applicable launch
> configurations, the user is prompted on how they want to launch the
> selection (i.e. which shortcut they want to use).
> When there are no applicable launch configurations or launch shortcuts,
> the
> platform either attempts to launch the associated project or launches
> last,
> based on user preference settings. When the user has chosen to launch the
> associated project, the same steps as above are followed, except the
> resource used is the project.
>
> For selection based launching to work well, plug-in providers should
> ensure
> the following.
>
> 1.. Resource mappings for launch configurations should be scoped to the
> appropriate resource. For example, to support projects with multiple Java
> executables, Java application launch configurations are associated with
> the
> the .java file containing the main class.
> 2.. Launch shortcut extensions should be updated with configurationType
> elements so the platform can infer which launch configuration types to
> consider when resolving launch configurations applicable to a
> selection/editor.
> 3.. Launch configuration migration delegates should be updated to
> create
> appropriate resource mappings for existing launch configurations. For
> example, if launch your launch configuration resource mappings in 3.2
> were
> always associated with a project, but now you want to associated them
> with
> specific files in a project to better support context launching, your
> migration delegate should be updated to update resource mappings.
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Contextual Launching Migration Guide? [message #315999 is a reply to message #315938] Mon, 28 May 2007 15:12 Go to previous message
Eclipse UserFriend
Yes, this is a bug. Please file.

Thanks,

Darin

"Mark Melvin" <mark_melvin@amis.com> wrote in message
news:op.tswc81w0y7f1g1@n-mmelvin.pc.amis.com...
> Hi Darin,
>
> I have one last question. I seem to have this all working reasonably well
> now except for one particular launch type that we have. It is a launch
> configuration type (and corresponding shortcut) that only supports the
> "run" mode. When I select a launchable resource of this type and choose
> Run, it launches it just fine. However, when I select the same resource
> and choose Debug (which our users will definitely end up doing) - I get
> the edit launch configuration dialog coming up with an error message that
> says "Mixed launch mode not supported: [Debug]", but the "Debug" button is
> disabled and there is basically nothing I can do in this situation at all
> except cancel the dialog. There is a link at the bottom of this page that
> says "Select a support launch mode." - which is clickable. But if I click
> it I just get an empty dialog as there are no supported "mode
> combinations" (whatever those are).
>
> I would rather have a dialog come up and tell me this launch mode is
> simply not supported, or nothing to happen at all. Having this dialog
> come up in which I cannot do anything is kind of pointless and very
> confusing.
>
> I'm assuming this is a bug? If so I will file one with more details and a
> screenshot. Otherwise, if I need to do something else to turn odd mixed
> mode launch support - what can I do? My launches are pretty standard
> vanilla launches that worked fine on Eclipse 3.2.x.
>
> Mark.
>
>
> On Thu, 24 May 2007 16:40:44 -0400, Darin Wright <Darin_Wright@ca.ibm.com>
> wrote:
>
>> I'm still working on the migration guide. So far, it's a work in
>> progress in
>> the buildnotes_platform-debug.html file:
>> Changes required when adopting 3.3 mechanisms and APIs
>> Launching Selected Resource vs. Launch Last
>>
>> By default, running and debugging applications has been simplified to
>> run or
>> debug the selected file or active editor. When the selected resource (or
>> active editor) is not executable, users can opt to launch the associated
>> project or re-launch the previous launch. These settings are managed on
>> the
>> Run/Debug > Launching preference page. Users can also revert to the 3.2
>> behavior of always launching the previous application.
>>
>> Pressing the Run or Debug toolbar button will launch the selected
>> resource
>> (as will the Run or Debug action in the top level Run menu). When no
>> launch
>> configuration exists for a file and there is only one way to launch it,
>> the
>> file will simply be launched in the mode selected. When there is more
>> than
>> one way to launch a file, the user will be prompted to select how to run
>> or
>> debug the application. For example, when running a JUnit test it can be
>> run
>> as a Java application or JUnit test. A launch configuration will be
>> created
>> and an entry will be added to the launch history for the application.
>> When
>> the same resource is launched again, it will use the most recent
>> configuration in the launch history associated with that resource.
>>
>> The underlying infrastructure for selection based launching relies on the
>> launch shortcuts applicable to a resource (or editor) and the resource
>> mappings associated with existing launch configurations. As well, API (a
>> new
>> extension element) has been added to the launchShortcuts extension to
>> associate a launch shortcut with one or more types of launch
>> configurations.
>> For example, this tells the platform that the "Java Application" launch
>> shortcut is associated with "Java Application" launch configurations.
>>
>> The contextual launch support uses the following approach to determine
>> how a
>> selection or active editor should be launched.
>>
>> 1.. An IResource adapter is retrieved from the selection or active
>> editor
>> (which can be null).
>> 2.. A set of applicable launch configuration types are computed from
>> the
>> set of launch shortcuts applicable to the selection/editor (using the new
>> launch configuration type elements defined by launch shortcuts).
>> 3.. A set of applicable launch configurations is computed based on the
>> launch configuration types applicable to the selection/editor and the
>> existing launch configurations in the workspace.
>> 4.. The set of applicable launch configurations is reduced to those
>> that
>> have a resource mapping equal to or contained by the retrieved resource
>> adapter
>> 5.. The set of applicable launch configurations is compared to the
>> launch
>> history and the most recently launched configuration in the set is
>> selected
>> for launching.
>> 6.. When there are applicable launch configurations, but none are in
>> the
>> recent launch history, the user is prompted to select one of the
>> applicable
>> configurations to launch.
>> 7.. When there are applicable launch shortcuts and no applicable launch
>> configurations, the user is prompted on how they want to launch the
>> selection (i.e. which shortcut they want to use).
>> When there are no applicable launch configurations or launch shortcuts,
>> the
>> platform either attempts to launch the associated project or launches
>> last,
>> based on user preference settings. When the user has chosen to launch the
>> associated project, the same steps as above are followed, except the
>> resource used is the project.
>>
>> For selection based launching to work well, plug-in providers should
>> ensure
>> the following.
>>
>> 1.. Resource mappings for launch configurations should be scoped to the
>> appropriate resource. For example, to support projects with multiple Java
>> executables, Java application launch configurations are associated with
>> the
>> the .java file containing the main class.
>> 2.. Launch shortcut extensions should be updated with configurationType
>> elements so the platform can infer which launch configuration types to
>> consider when resolving launch configurations applicable to a
>> selection/editor.
>> 3.. Launch configuration migration delegates should be updated to
>> create
>> appropriate resource mappings for existing launch configurations. For
>> example, if launch your launch configuration resource mappings in 3.2
>> were
>> always associated with a project, but now you want to associated them
>> with
>> specific files in a project to better support context launching, your
>> migration delegate should be updated to update resource mappings.
>>
>>
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:Log4j doesn't work in Eclipse plugin package
Next Topic:External Tool Launchers - Using variable env_var
Goto Forum:
  


Current Time: Thu Sep 25 11:00:55 EDT 2025

Powered by FUDForum. Page generated in 0.04406 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top