Skip to content

Commit

Permalink
Merge pull request #232 from Microsoft/users/arukhlin/wit_editor
Browse files Browse the repository at this point in the history
Replace the browser based work item editor with an External Web Browser
  • Loading branch information
AlexRukhlin committed Sep 5, 2017
2 parents 6ddd063 + 9eec40c commit 0480851
Show file tree
Hide file tree
Showing 55 changed files with 119 additions and 99 deletions.
4 changes: 2 additions & 2 deletions build/build-1-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
number.version.minor ("0")
number.version.service ("2")
number.version.build ("1234XYZ")
string.version.1-2-3 ("14.123.0")
string.version.1-2-3-4 ("14.123.0.1234XYZ")
string.version.1-2-3 ("14.123.1")
string.version.1-2-3-4 ("14.123.1.1234XYZ")
-->
<target name="read_version_config">

Expand Down
14 changes: 7 additions & 7 deletions build/category.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/com.microsoft.tfs.client.eclipse.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.client.eclipse.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.client.eclipse.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.client.eclipse.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.client.eclipse.category"/>
</feature>
<feature url="features/com.microsoft.tfs.client.eclipse.nl1.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.client.eclipse.nl1.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.client.eclipse.nl1.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.client.eclipse.nl1.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.client.eclipse.category"/>
</feature>
<feature url="features/com.microsoft.tfs.client.eclipse.nlz.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.client.eclipse.nlz.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.client.eclipse.nlz.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.client.eclipse.nlz.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.client.eclipse.language-packs.category"/>
</feature>
<feature url="features/com.microsoft.tfs.pt.alertsubscription.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.pt.alertsubscription.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.pt.alertsubscription.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.pt.alertsubscription.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.pt.category"/>
</feature>
<feature url="features/com.microsoft.tfs.pt.findinsce.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.pt.findinsce.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.pt.findinsce.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.pt.findinsce.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.pt.category"/>
</feature>
<feature url="features/com.microsoft.tfs.pt.testrunner.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.pt.testrunner.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.pt.testrunner.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.pt.testrunner.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.pt.category"/>
</feature>
<feature url="features/com.microsoft.tfs.pt.wit.templates.feature_14.123.0.qualifier.jar" id="com.microsoft.tfs.pt.wit.templates.feature" version="14.123.0.qualifier">
<feature url="features/com.microsoft.tfs.pt.wit.templates.feature_14.123.1.qualifier.jar" id="com.microsoft.tfs.pt.wit.templates.feature" version="14.123.1.qualifier">
<category name="com.microsoft.tfs.pt.category"/>
</feature>
<category-def name="com.microsoft.tfs.client.eclipse.category" label="Team Explorer Everywhere">
Expand Down
4 changes: 2 additions & 2 deletions build/product_version.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This comment contains the full version number (14.123.0) so this file gets
# This comment contains the full version number (14.123.1) so this file gets
# picked up when doing workspace searches for the version number string.

number.version.major=14
number.version.minor=123
number.version.service=0
number.version.service=1
# number.version.build gets defined at build time.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies.build; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.checkinpolicies.build.TFSBuildCheckinPolicyPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies.checkforcomments; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Export-Package: com.microsoft.tfs.checkinpolicies.checkforcomments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies.forbiddenpatterns; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Export-Package: com.microsoft.tfs.checkinpolicies.forbiddenpatterns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies.workitempolicy; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies.workitemquerypolicy; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Export-Package: com.microsoft.tfs.checkinpolicies.workitemquerypolicy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.checkinpolicies; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.checkinpolicies.TFSCheckinPoliciesPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion source/com.microsoft.tfs.client.clc.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.microsoft.tfs.client.clc.feature"
label="%Feature-Name"
version="14.123.0.qualifier"
version="14.123.1.qualifier"
provider-name="%Feature-Vendor">

<description>
Expand Down
2 changes: 1 addition & 1 deletion source/com.microsoft.tfs.client.clc/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.clc
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Require-Bundle: com.microsoft.tfs.console,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common.pid
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common.ui.teambuild.egit;singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common.ui.teambuild; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.client.common.ui.teambuild.TFSTeamBuildPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common.ui.vcexplorer; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.client.common.ui.vcexplorer.TFSVersionControlExplorerPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common.ui; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.client.common.ui.TFSCommonUIClientPlugin
Bundle-Vendor: %Bundle-Vendor
Eclipse-LazyStart: true
Expand Down
2 changes: 2 additions & 0 deletions source/com.microsoft.tfs.client.common.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,12 @@
displayName="%extension.workItemEditor.teamWebAccess"
id="com.microsoft.tfs.client.common.ui.teamwebaccess">
</workItemEditor>
<!--
<workItemEditor
displayName="%extension.workItemEditor.embeddedWebAccess"
id="com.microsoft.tfs.client.common.ui.webaccessintegration.editors.WebAccessWorkItemEditor">
</workItemEditor>
-->
</extension>
<extension
point="com.microsoft.tfs.client.common.ui.teamExplorerPage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
Expand All @@ -29,13 +28,11 @@
import com.microsoft.tfs.client.common.framework.command.ICommandExecutor;
import com.microsoft.tfs.client.common.server.TFSServer;
import com.microsoft.tfs.client.common.ui.Messages;
import com.microsoft.tfs.client.common.ui.TFSCommonUIClientPlugin;
import com.microsoft.tfs.client.common.ui.browser.BrowserFacade;
import com.microsoft.tfs.client.common.ui.browser.BrowserFacade.LaunchMode;
import com.microsoft.tfs.client.common.ui.framework.command.UICommandExecutorFactory;
import com.microsoft.tfs.client.common.ui.framework.helper.MessageBoxHelpers;
import com.microsoft.tfs.client.common.ui.framework.helper.ShellUtils;
import com.microsoft.tfs.client.common.ui.prefs.UIPreferenceConstants;
import com.microsoft.tfs.client.common.ui.teamexplorer.helpers.WorkItemHelpers;
import com.microsoft.tfs.client.common.ui.webaccessintegration.editors.WebAccessWorkItemEditorInput;
import com.microsoft.tfs.client.common.ui.wit.form.WorkItemEditorInfo;
Expand Down Expand Up @@ -238,9 +235,21 @@ public static void openEditor(final TFSServer server, final WorkItem workItem, f
* editor if the preferred editor is no longer contributed.
*/
private static String getPreferredWorkItemEditorID() {

// Find the preferred work item editor.
final IPreferenceStore preferences = TFSCommonUIClientPlugin.getDefault().getPreferenceStore();
final String prefValue = preferences.getString(UIPreferenceConstants.WORK_ITEM_EDITOR_ID);

/* @formatter:off
*
* We decided to always use the External Web Browser Editor for work items.
* S123 09/05/2017
*
* final IPreferenceStore preferences = TFSCommonUIClientPlugin.getDefault().getPreferenceStore();
* final String prefValue = preferences.getString(UIPreferenceConstants.WORK_ITEM_EDITOR_ID);
*
* @formatter:on
*/

final String prefValue = EXTERNAL_WEB_ACCESS_EDITOR_ID;

// Check that the preferred work item editor still exists.
final IExtensionRegistry registry = Platform.getExtensionRegistry();
Expand All @@ -257,7 +266,7 @@ private static String getPreferredWorkItemEditorID() {
}

// Default to embedded Web Access editor
return EMBEDDED_WEB_ACCESS_EDITOR_ID;
return EXTERNAL_WEB_ACCESS_EDITOR_ID;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void initializeDefaultPreferences() {

prefs.setDefault(UIPreferenceConstants.GATED_CONFIRMATION_PRESERVE_PENDING_CHANGES, true);

prefs.setDefault(UIPreferenceConstants.WORK_ITEM_EDITOR_ID, WorkItemEditorHelper.EMBEDDED_WEB_ACCESS_EDITOR_ID);
prefs.setDefault(UIPreferenceConstants.WORK_ITEM_EDITOR_ID, WorkItemEditorHelper.EXTERNAL_WEB_ACCESS_EDITOR_ID);

prefs.setDefault(UIPreferenceConstants.DETECT_LOCAL_CHANGES_ON_MANUAL_RECONNECT, true);
prefs.setDefault(UIPreferenceConstants.DETECT_LOCAL_CHANGES_ON_AUTOMATIC_RECONNECT, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,32 @@ protected void createFieldEditors() {
{
Messages.getString("WITPreferencePage.LaunchBrowserWithAttachment"), //$NON-NLS-1$
UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT_LAUNCH_BROWSER
}, {
Messages.getString("WITPreferencePage.DownloadAttachmentToTemp"), //$NON-NLS-1$
UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT_LAUNCH_LOCAL
}
}, getFieldEditorParent(), true);

workItemEditorPrefsEditor = new RadioGroupFieldEditor(
UIPreferenceConstants.WORK_ITEM_EDITOR_ID,
Messages.getString("WITPreferencePage.WorkItemEditorGroupLabel"), //$NON-NLS-1$
1,
getWorkItemEditors(),
}, {
Messages.getString("WITPreferencePage.DownloadAttachmentToTemp"), //$NON-NLS-1$
UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT_LAUNCH_LOCAL
}
},
getFieldEditorParent(),
true);

addField(openFileAttachmentPrefsEditor);
addField(workItemEditorPrefsEditor);

/*@formatter:off
*
* We decided to always use the External Web Browser Editor for work items.
* S123 09/05/2017
*
* workItemEditorPrefsEditor = new RadioGroupFieldEditor(
* UIPreferenceConstants.WORK_ITEM_EDITOR_ID,
* Messages.getString("WITPreferencePage.WorkItemEditorGroupLabel"), //$NON-NLS-1$
* 1,
* getWorkItemEditors(),
* getFieldEditorParent(),
* true);
* addField(workItemEditorPrefsEditor);
*
* @formatter:on
*/

/*
* Get the controls back out of the field editor to set automation IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public void run() {
openAction.setText(Messages.getString("WorkItemLinksControl.OpenActionText")); //$NON-NLS-1$

final List<WorkItemEditorInfo> editors = WorkItemEditorHelper.getWorkItemEditors();
if (editors != null && editors.size() > 0) {
if (editors != null && editors.size() > 1) {
int count = 0;
openWithActions = new OpenWorkItemWithAction[editors.size()];

Expand Down Expand Up @@ -859,7 +859,7 @@ private boolean isSelectedLinkOpenable() {
protected void createButtons(final Composite parent) {
newButton =
createButton(parent, Messages.getString("WorkItemLinksControl.NewButtonText"), new SelectionAdapter() //$NON-NLS-1$
{
{
@Override
public void widgetSelected(final SelectionEvent e) {
performNew();
Expand All @@ -870,7 +870,7 @@ public void widgetSelected(final SelectionEvent e) {

addButton =
createButton(parent, Messages.getString("WorkItemLinksControl.AddLinkButtonText"), new SelectionAdapter() //$NON-NLS-1$
{
{
@Override
public void widgetSelected(final SelectionEvent e) {
performAdd();
Expand All @@ -880,7 +880,7 @@ public void widgetSelected(final SelectionEvent e) {

openButton =
createButton(parent, Messages.getString("WorkItemLinksControl.OpenButtonText"), new SelectionAdapter() //$NON-NLS-1$
{
{
@Override
public void widgetSelected(final SelectionEvent e) {
performOpen();
Expand All @@ -890,7 +890,7 @@ public void widgetSelected(final SelectionEvent e) {

deleteButton =
createButton(parent, Messages.getString("WorkItemLinksControl.DeleteButtonText"), new SelectionAdapter() //$NON-NLS-1$
{
{
@Override
public void widgetSelected(final SelectionEvent e) {
performDelete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public void run() {
openAction.setText(Messages.getString("QueryResultsControl.OpenActionText")); //$NON-NLS-1$

final List<WorkItemEditorInfo> editors = WorkItemEditorHelper.getWorkItemEditors();
if (editors != null && editors.size() > 0) {
if (editors != null && editors.size() > 1) {
int count = 0;
openWithActions = new OpenWorkItemWithAction[editors.size()];

Expand Down Expand Up @@ -854,9 +854,10 @@ protected Object getTransferData(
cellData = "<a href=\"" + url + "\">" + cellData + "</a>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}

sb.append("<td valign=top style='border:none;border-right:solid white 1.0pt;background:" //$NON-NLS-1$
+ bgColor
+ ";padding:1.45pt .05in 1.45pt .05in'>"); //$NON-NLS-1$
sb.append(
"<td valign=top style='border:none;border-right:solid white 1.0pt;background:" //$NON-NLS-1$
+ bgColor
+ ";padding:1.45pt .05in 1.45pt .05in'>"); //$NON-NLS-1$
sb.append("<p><span style='font-family:\"Calibri\",\"sans-serif\"'>"); //$NON-NLS-1$
sb.append(cellData);
sb.append("</span></p></td>"); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.common; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Activator: com.microsoft.tfs.client.common.TFSCommonClientPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.microsoft.tfs.client.eclipse.feature"
label="%Feature-Name"
version="14.123.0.qualifier"
version="14.123.1.qualifier"
provider-name="%Feature-Vendor"
plugin="com.microsoft.tfs.client.eclipse.ui">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.microsoft.tfs.client.eclipse.help; singleton:=true
Bundle-Version: 14.123.0.qualifier
Bundle-Version: 14.123.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Eclipse-LazyStart: true
Loading

0 comments on commit 0480851

Please sign in to comment.