Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 133517 Details for
Bug 132352
[quick diff] "Live" Show Annotation should also be available from ruler context menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_v01
132352_v01.txt (text/plain), 4.44 KB, created by
Pawel Pogorzelski
on 2009-04-28 05:51:42 EDT
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2009-04-28 05:51:42 EDT
Size:
4.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.cvs.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/plugin.xml,v >retrieving revision 1.282 >diff -u -r1.282 plugin.xml >--- plugin.xml 6 Mar 2009 15:09:45 -0000 1.282 >+++ plugin.xml 28 Apr 2009 09:50:45 -0000 >@@ -184,7 +184,38 @@ > </popupMenu> > </viewer> > </extension> >- >+ >+<!-- *************** Property Testers **************** --> >+ <extension point="org.eclipse.core.expressions.propertyTesters"> >+ <propertyTester >+ id="org.eclipse.team.internal.ccvs.ui.IEditorInputTester" >+ type="org.eclipse.ui.IEditorInput" >+ namespace="org.eclipse.team.internal.ccvs.ui" >+ properties="isManaged" >+ class="org.eclipse.team.internal.ccvs.ui.IEditorInputTester"> >+ </propertyTester> >+ </extension> >+ >+<!-- *************** Menus **************** --> >+ <extension point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="popup:#AbstractTextEditorRulerContext?after=QuickDiff.Toggle"> >+ <command >+ commandId="org.eclipse.team.cvs.ui.showAnnotation" >+ style="push"> >+ <visibleWhen >+ checkEnabled="false"> >+ <with variable="activeEditorInput"> >+ <test >+ property="org.eclipse.team.internal.ccvs.ui.isManaged" >+ value="true"> >+ </test> >+ </with> >+ </visibleWhen> >+ </command> >+ </menuContribution> >+ </extension> >+ > <!-- *************** Authenticator **************** --> > <extension > point="org.eclipse.team.cvs.core.authenticator"> >Index: src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java >diff -N src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,61 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 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 >+ *******************************************************************************/ >+package org.eclipse.team.internal.ccvs.ui; >+ >+import org.eclipse.core.expressions.PropertyTester; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResourceStatus; >+import org.eclipse.team.core.TeamException; >+import org.eclipse.team.internal.ccvs.core.CVSException; >+import org.eclipse.team.internal.ccvs.core.ICVSResource; >+import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot; >+import org.eclipse.team.internal.core.TeamPlugin; >+import org.eclipse.ui.IFileEditorInput; >+ >+public class IEditorInputTester extends PropertyTester { >+ >+ public boolean test(Object receiver, String property, Object[] args, >+ Object expectedValue) { >+ >+ Boolean actual = Boolean.FALSE; >+ if (property.equals("isManaged")) { //$NON-NLS-1$ >+ if (receiver instanceof IFileEditorInput) { >+ IFileEditorInput input = (IFileEditorInput) receiver; >+ IFile file = input.getFile(); >+ ICVSResource cvsResource = CVSWorkspaceRoot >+ .getCVSResourceFor(file); >+ try { >+ actual = new Boolean((cvsResource != null >+ && !cvsResource.isFolder() && cvsResource >+ .isManaged())); >+ } catch (CVSException e) { >+ actual = new Boolean(isEnabledForException(e)); >+ } >+ return (actual.equals(expectedValue)); >+ } >+ return false; >+ } >+ >+ return false; >+ } >+ >+ protected boolean isEnabledForException(TeamException exception) { >+ if (exception.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) { >+ // Enable the action to allow the user to discover the problem >+ return true; >+ } >+ // We should not open a dialog when determining menu enablement so log >+ // it instead >+ TeamPlugin.log(exception); >+ return false; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 132352
: 133517