DESCRIPTION

Bug 90292: Extension to select how to handle unknown file types

I'm experimenting around an extension point to plug strategies on how to
handle unassociated file types. The default one would remain the current
"System editor then Text", and I'll try 2 alternative extensions for
"Let user select editor" and "Poll a remote suggestion/discovery
service".
The choice between the strategy would be managed as a preference, that
RCP providers could set via plugin_customization.ini and/or API; and
that user could set via preference page.

Change-Id: Icd394758a09788a06cba09e17d8951afbf89eb14
Signed-off-by: Isis Velasquez xxx@xxx.xxx


COMMENTS

author: Isis Velasquez
date: 2015-12-15 10:58:28.000000000

Uploaded patch set 3: Patch Set 2 was rebased.

-------------------------------------
author: Brenden Conley
date: 2015-12-15 10:58:34.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7762/

-------------------------------------
author: Brenden Conley
date: 2015-12-15 11:42:36.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7762/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2015-12-17 12:12:33.000000000

Patch Set 3: Code-Review-1

(11 comments)

I like the change, -1 because I miss the most requested feature: "TextEditorOnly" strategy. Please add this!

Also some smaller issues in comments below.

Line:365, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkLeon OchoachPlugin.java -> Please undo the white space change, this will remove this file from commit

Line:21, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/AskUserViaPopupUnknowEditorStrategy.java -> Please remove this noise

Line:324, bundles/org.eclipse.ui.ide/plugin.properties -> I think we should use "System editor" label here, as the default is always text editor, and we do not need to mention this, and UI will be not that abused.

Line:31, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/UnknownEditorStrategyRegistry.java -> please init the filed or add everywhere check for null

Line:73, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/UnknownEditorStrategyRegistry.java -> I would not assign the new map right here, since it might cause problems on concurrent read/write operations with getLabel() below. Just use local variable and assign at the end.

Also I don't like the fact that "get" modifies the sate. I would rather separate initialization and retrieval. Otherwise each "innocent" call will re-create the map which costs time.

Line:90, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/UnknownEditorStrategyRegistry.java -> I would mention here that we can return null

Line:1023, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java -> I would mention that we never return null here.

Line:21, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/SystemEditorOrTextEditor.java -> I actually miss "TextEditorOnly" strategy, which is the most requested feature.

Line:18, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IUnknownEditorStrategy.java -> file name

Line:31, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IUnknownEditorStrategy.java -> default strategy should be used

Line:1011, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties -> Would be "Open unknown files with:" better?

-------------------------------------
author: Adalynn Simmons
date: 2015-12-17 13:39:06.000000000

Patch Set 3:

(2 comments)

minor comments

Line:1, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/AskUserViaPopupUnknowEditorStrategy.java -> missing header

Line:69, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ExtendedFileEditorsPreferencePage.java -> return directly NLS.bind ?

-------------------------------------
author: Sebastian Porter
date: 2015-12-17 13:42:57.000000000

Patch Set 3: Code-Review+2

-------------------------------------
author: Sebastian Porter
date: 2015-12-17 13:43:19.000000000

Patch Set 3: -Code-Review

Sorry, hit the wrong button

-------------------------------------
author: Jayvion Booth
date: 2015-12-17 14:01:31.000000000

Patch Set 3:

(1 comment)

Line:143, bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java -> xxx@xxx.xxx tag

-------------------------------------
author: Gerrit Code Review
date: 2015-12-24 19:24:34.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
