DESCRIPTION

Bug 411821 - [QuickAccess] Contribute SearchField through a fragment or other means

Provide the "QuickAccess" via a e4 application model fragment inside
of the "org.eclipse.ui.ide.application". This removes the "QuickAccess"
search field from every none "org.eclipse.ui.ide.application". If another
application wants to have the search field too, it simple has to provide
an e4 application model fragment similiar which defines the required
ToolControl. (take a look at org.eclipse.ui.ide.application/LegacyIDE_fragment.e4xmi
to see an example)

Change-Id: Iba8ca5dfb6d494e99f8e81512e9ce28cb38a6913
Signed-off-by: Jaydon Logan xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-12-24 15:54:22.000000000

Patch Set 5:

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

-------------------------------------
author: Slade Moran
date: 2013-12-24 16:27:24.000000000

Patch Set 5: Code-Review-1

(9 comments)

Hi René, I think this is almost ready.  I've included comments in the code that need to be addressed.

Also, can you test with an existing workspace?  When I do that, I get 2 quick access bars in my existing window, although opening a new window will correctly provide one.

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> This needs a copyright header entry, similar to:
/*******************************************************************************
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Zhongwei Zhao - Bug 379495 - Two "Run" on top menu
 *     Soren Davidson - Bug 391481 - Contributing perspectiveExtension, hiddenMenuItem 
 *     								 removes a menu from multiple perspectives
 *******************************************************************************/

Line:64, bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> The javadoc should say that null is valid.

Line:78, bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> I'd prefer you pick some meaningful default, like 0 or -1, and deal with the exceptions and the possibility of NPEs in this method.

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/ModelUtils.java -> Please add yourself to the copyright comment, with an entry similar to:
 *     IBM Corporation - initial API and implementation
 *     Zhongwei Zhao - Bug 379495 - Two "Run" on top menu

Line:12, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> Please add your line to the Contributors section

Line:897, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> If it fails out and we don't know what to do with it, please log an error with appropriate information.   You can use WorkbenchPlugin.log(*).  Throwing an exception might kill the workbench startup completely.

Line:944, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> The substring(#) should be calculated against the MOVE_TAG

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/Position.java -> This needs a copyright header entry, similar to:
/*******************************************************************************
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Zhongwei Zhao - Bug 379495 - Two "Run" on top menu
 *     Soren Davidson - Bug 391481 - Contributing perspectiveExtension, hiddenMenuItem 
 *     								 removes a menu from multiple perspectives
 *******************************************************************************/

File Comment: bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF -> In the MANIFEST.MF editor, you need to add the new fragment file to in the Build tab (binary section) so it's included in the binary build.

-------------------------------------
author: Brenden Conley
date: 2013-12-24 16:29:25.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Jaydon Logan
date: 2013-12-27 23:56:09.000000000

Patch Set 5:

(9 comments)

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> Done

Line:64, bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> Done

Line:78, bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/PositionInfo.java -> I didn't change this one, because the previous ModelUtils#merge() method also throws the exceptions if it access the index.

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/ModelUtils.java -> Done

Line:12, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> Done

Line:897, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> Done

Line:944, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java -> Done

File Comment: bundles/org.eclipse.e4.ui.model.workLeon Ochoach/src/org/eclipse/e4/ui/model/internal/Position.java -> Done

File Comment: bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF -> Done. Thanks for the hint.

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