| 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;
|
| + }
|
| }
|
|
|