Bug 108946 - [Perspectives] [EditorMgmt] Allow preferred perspective(s) for specific editors
Summary: [Perspectives] [EditorMgmt] Allow preferred perspective(s) for specific editors
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-09-07 11:32 EDT by John Houston CLA
Modified: 2019-09-06 16:15 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Houston CLA 2005-09-07 11:32:14 EDT
Currently, the link between file type and perspective is through the editor:
associate a file type (extension) to an editor then associate the editor to a
set of preferred perspectives. 

There are cases where the file extension does not completely describe the file.
For example, the existence of known meta-data (in, say, annotations from Java
5.0) to Java files can flag the Java file as a new type of Java file. If users
are to contribute to the perspective extension point, they should the ability to
create expressions that determine when that perspective should be opened.

Either the source editor extension point (to keep the existing association model
intact) or the perspective extenstion point should be updated to make use of the
exxpressions extension point and give the extension developer the opportunity to
 declaratively determine when a perspective is the preferred perspective.
Comment 1 Nick Edgar CLA 2005-09-07 11:53:18 EDT
I'm a bit confused by the above.  There's currently no way of associating files
or editors with perspectives.  In the newWizards extension point, you can
associate  a preferred perspective (one or more, actually) with a new project
wizard (e.g. create a Plug-in project, get prompted to switch to PDE perspective).

Can you describe your scenario in more detail?  Note that, in addition to the
declarative expression language, there is the content types mechanism for
mapping a file name and/or analysis of a file's content to a content type, which
can then be mapped to editor type.  XML files are the canonical example here. 
See the Content Types pref page under General.

Comment 2 John Houston CLA 2005-12-23 12:50:58 EST
After looking again, you are right -- my comments are confusing. The scenario is: I import or create a Java file with meta data within the file that describes the file in more detail and when I open an editor for that file a suppressible dialog is shown with wording something like, "This type of file is best viewed with the XXXX perspective. Would you like to switch perspectives now?"

In short, the ability to switch perspectives programatically should be added as an exit point when opening new editors.
Comment 3 Nick Edgar CLA 2006-01-04 12:38:23 EST
Thanks for clarifying.  I'm rewording the summary accordingly.
We have no plans to address this enhancement for 3.2.
Comment 4 Nick Edgar CLA 2006-03-15 11:46:55 EST
Reassigning bugs in component areas that are changing ownership.
Comment 5 Paul Webster CLA 2006-09-28 11:01:14 EDT
There are currently no plans to work on this feature.

PW
Comment 6 Denis Roy CLA 2007-06-22 09:33:04 EDT
Changes requested on bug 193523
Comment 7 Eclipse Webmaster CLA 2019-09-06 16:15:33 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.