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 107166 Details for
Bug 240442
[wikitext] specify implementation for other resource, e.g. cpp, task, unknown file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
require bug 240423 and bug 240441
clipboard.txt (text/plain), 9.26 KB, created by
Jingwen 'Owen' Ou
on 2008-07-10 23:57:06 EDT
(
hide
)
Description:
require bug 240423 and bug 240441
Filename:
MIME Type:
Creator:
Jingwen 'Owen' Ou
Created:
2008-07-10 23:57:06 EDT
Size:
9.26 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.sandbox.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.sandbox.ui/plugin.xml,v >retrieving revision 1.87 >diff -u -r1.87 plugin.xml >--- plugin.xml 4 Jul 2008 18:29:40 -0000 1.87 >+++ plugin.xml 11 Jul 2008 03:56:06 -0000 >@@ -2,7 +2,8 @@ > <?eclipse version="3.0"?> > <plugin> > <extension-point id="taskEditorExtensions" name="Task Editor Extension" schema="schema/taskEditorExtensions.exsd"/> >- >+ <extension-point id="resourceHyperlinkExtensions" name="Resource Hyperlink Extension" schema="schema/resourceHyperlinkExtensions.exsd"/> >+ > <extension point="org.eclipse.ui.views"> > <category name="Experimental" id="org.eclipse.mylyn.sandbox"/> > </extension> >@@ -404,8 +405,37 @@ > </propertyTester> > </extension> > >- >- >+ <extension >+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors"> >+ <hyperlinkDetector >+ class="org.eclipse.mylyn.internal.sandbox.ui.hyperlinks.ResourceHyperlinkDetector" >+ id="org.eclipse.mylyn.sandbox.ui.hyperlinkDetector" >+ name="Resource Hyperlink Detector" >+ targetId="org.eclipse.ui.DefaultTextEditor"> >+ </hyperlinkDetector> >+ </extension> >+ >+ <extension >+ point="org.eclipse.mylyn.sandbox.ui.resourceHyperlinkExtensions"> >+ <resourceHyperlinkExtension >+ class="org.eclipse.mylyn.internal.sandbox.ui.hyperlinks.JavaResourceHyperlinkExtension" >+ fileType="java" >+ generatedPrefix="java class"> >+ </resourceHyperlinkExtension> >+ <resourceHyperlinkExtension >+ class="org.eclipse.mylyn.internal.sandbox.ui.hyperlinks.CppResourceHyperlinkExtension" >+ >+ fileType="cpp" >+ generatedPrefix="cpp class"> >+ >+ </resourceHyperlinkExtension> >+ <resourceHyperlinkExtension >+ class="org.eclipse.mylyn.internal.sandbox.ui.hyperlinks.UnknownResourceHyperlinkExtension" >+ fileType="unknown" >+ generatedPrefix="file"> >+ </resourceHyperlinkExtension> >+ </extension> >+ > <!-- > <extension point="org.eclipse.mylyn.tasks.ui.presentations"> > <presentation >Index: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlink.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlink.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlink.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlink.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.sandbox.ui.hyperlinks; >+ >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+ >+/** >+ * @author Jingwen Ou >+ */ >+public class CppResourceHyperlink implements IHyperlink { >+ >+ private final IRegion region; >+ >+ private final String typeName; >+ >+ public CppResourceHyperlink(IRegion region, String typeName) { >+ this.region = region; >+ this.typeName = typeName; >+ } >+ >+ public IRegion getHyperlinkRegion() { >+ return region; >+ } >+ >+ public String getHyperlinkText() { >+ return "Open " + typeName; >+ } >+ >+ public String getTypeLabel() { >+ return null; >+ } >+ >+ public void open() { >+ // TODO: check out cdt >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlink.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlink.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlink.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlink.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.sandbox.ui.hyperlinks; >+ >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+ >+/** >+ * @author Jingwen Ou >+ */ >+public class UnknownResourceHyperlink implements IHyperlink { >+ private final IRegion region; >+ >+ private final String typeName; >+ >+ public UnknownResourceHyperlink(IRegion region, String typeName) { >+ this.region = region; >+ this.typeName = typeName; >+ } >+ >+ public IRegion getHyperlinkRegion() { >+ return region; >+ } >+ >+ public String getHyperlinkText() { >+ return "Open " + typeName; >+ } >+ >+ public String getTypeLabel() { >+ // ignore >+ return null; >+ } >+ >+ public void open() { >+ // TODO: open default editor for specific resource >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlinkExtension.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlinkExtension.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlinkExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/UnknownResourceHyperlinkExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.sandbox.ui.hyperlinks; >+ >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+ >+/** >+ * @author Jingwen Ou >+ */ >+public class UnknownResourceHyperlinkExtension extends AbstractResourceHyperlinkExtension { >+ private static final String UNKNOWN_PREFIX = "file\\s"; >+ >+ @Override >+ protected String getReourceExpressions() { >+ return UNKNOWN_PREFIX + DEFAULT_QUALIFIED_NAME; >+ } >+ >+ @Override >+ public boolean resourceExists(String resourceName) { >+ // ignore >+ return true; >+ } >+ >+ @Override >+ protected IHyperlink getHyperlink(IRegion region, String resourceName) { >+ return new UnknownResourceHyperlink(region, resourceName); >+ } >+} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlinkExtension.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlinkExtension.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlinkExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/hyperlinks/CppResourceHyperlinkExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,37 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.sandbox.ui.hyperlinks; >+ >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+ >+/** >+ * @author Jingwen Ou >+ */ >+public class CppResourceHyperlinkExtension extends AbstractResourceHyperlinkExtension { >+ >+ private static final String CPP_PREFIX = "cpp\\sclass\\s"; >+ >+ @Override >+ protected String getReourceExpressions() { >+ return CPP_PREFIX + DEFAULT_QUALIFIED_NAME; >+ } >+ >+ @Override >+ public boolean resourceExists(String resourceName) { >+ // TODO: check out cdt for answers, ignore for now >+ return false; >+ } >+ >+ @Override >+ protected IHyperlink getHyperlink(IRegion region, String resourceName) { >+ return new CppResourceHyperlink(region, resourceName); >+ } >+ >+}
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 240442
: 107166 |
107167