Bug 64763 - build.properties editor opened
Summary: build.properties editor opened
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 53700
Blocks:
  Show dependency tree
 
Reported: 2004-05-31 11:41 EDT by Jeff McAffer CLA
Modified: 2005-04-20 01:00 EDT (History)
0 users

See Also:


Attachments
Patch against PDE UI for using IEditorMatchingStrategy and IShowEditorInput (5.04 KB, patch)
2005-03-29 15:05 EST, Nick Edgar CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2004-05-31 11:41:57 EDT
in RC1

when I double click on a build.properties file I get a Build Properties 
editor.  If I double click on a plugin.xml or manifest.mf I get a Plugin Editor 
which has build properties and build.properties tabs.  This is confusing.  
There should be one mainline way of editing these files.  It should always use 
the cool new unified editor.
Comment 1 Dejan Glozic CLA 2004-05-31 11:58:00 EDT
Jeff, we regret this but we were not able to register the cool new editor for 
build.properties. The problem is that with the 3.0 platform UI support, only 
one editor can claim to edit any particular file or a set of files with the 
same extension. Since both plugin and feature projects need to handle 
build.properties, we could not register both plug-in and feature manifest 
editor to edit build.properties. For this reason, we had to use the same new 
cool editor infrastructure to create a standalone build.properties editor that 
will handle this file.

What we really need is some kind of logic that picks the right editor based on 
the context (i.e. the project it belongs to). That way, we would be able to 
choose plugin or feature editor to open build.properties depending on the 
project nature. Sadly, we cannot do it today.

Comment 2 Jeff McAffer CLA 2004-05-31 12:08:56 EDT
could you not register an editor for build.properties that does the check (am I 
in a feature/plugin/fragment) and then delegates to the appropriate cool editor 
implementation?
Comment 3 Dejan Glozic CLA 2004-05-31 18:16:40 EDT
I am not sure we can pull such a trick - it is definitely strange to have 
an 'editor' that is really a branch that opens a 'real' editor depending on 
the context. 
Comment 4 Jeff McAffer CLA 2004-06-01 10:31:29 EDT
related to this, I noticed that when editing a fragment that has a fragment.xml 
and a manifest.xml I ended up with two full fragment editors open.  This was 
very confusing as I made changes in one and then happened (due mostly to 
difficulties in managing open editors) to look in the other and the changes did 
not appear to be there.  I did not even notice that I had two until I started 
closing the various editors and was left with two with the same title.
Comment 5 Wassim Melhem CLA 2004-06-01 10:35:54 EDT
Once the Platform/UI team addresses bug 53700, then all this confusion would 
go away.
Comment 6 Nick Edgar CLA 2005-03-29 15:05:55 EST
Created attachment 19285 [details]
Patch against PDE UI for using IEditorMatchingStrategy and IShowEditorInput

This patch shows how to use the new IEditorMatchingStrategy and
IShowEditorInput mechanisms described in bug 74263 to solve the problem
described here.
Comment 7 Nick Edgar CLA 2005-03-29 15:09:13 EST
Note that the patch is just a prototype.

Some things to be aware of:
- not sure whether the manifest editor takes other kinds of input besides
IFileEditorInput
- not sure whether the filename treatment in the matcher is accurate:
  - should it use toLowerCase()
  - should it always match all candidate files, or just the ones actually open
in the editor?
- the other PDE editors haven't been addressed
- the IShowEditorInput support ignores the form-based pages, it only finds the
source pages, which may not be what you want

Comment 8 Nick Edgar CLA 2005-03-29 15:11:48 EST
In my opinion, this bug no longer depends on bug 53700 due to the new support
described in bug 74263.
Comment 9 Wassim Melhem CLA 2005-04-20 01:00:44 EDT
fixed.  thanks Nick.