Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2085)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/proposals/TrackedNodeProposal.java

Issue 10828389: Enhance 'Create Method' Quick Fix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/proposals/TrackedNodeProposal.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/css/CssLabelProvider.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/proposals/TrackedNodeProposal.java
similarity index 56%
copy from editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/css/CssLabelProvider.java
copy to editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/proposals/TrackedNodeProposal.java
index 3ff73f8f97469df65a5c495145263bd2bbc7a8f0..d8c9c54606bfff5baaeafd46d5196268baf45287 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/css/CssLabelProvider.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/proposals/TrackedNodeProposal.java
@@ -11,30 +11,29 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+package com.google.dart.tools.ui.internal.text.correction.proposals;
-package com.google.dart.tools.ui.web.css;
+import com.google.dart.tools.core.dom.rewrite.TrackedNodePosition;
-import com.google.dart.tools.ui.web.DartWebPlugin;
-import com.google.dart.tools.ui.web.utils.Node;
-
-import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
/**
- * A label provider for css model elements.
+ * Proposal for {@link TrackedNodePosition}.
*/
-public class CssLabelProvider extends LabelProvider {
+public final class TrackedNodeProposal {
+ private final Image icon;
+ private final String text;
- @Override
- public Image getImage(Object element) {
- return DartWebPlugin.getImage("topic_small.gif");
+ public TrackedNodeProposal(Image icon, String text) {
+ this.icon = icon;
+ this.text = text;
}
- @Override
- public String getText(Object element) {
- Node node = (Node) element;
-
- return node.getLabel();
+ public Image getIcon() {
+ return icon;
}
+ public String getText() {
+ return text;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698