| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/TemplateCompletionProposalComputer.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/TemplateCompletionProposalComputer.java (revision 7347)
|
| +++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/TemplateCompletionProposalComputer.java (working copy)
|
| @@ -1,25 +1,23 @@
|
| /*
|
| - * Copyright (c) 2011, the Dart project authors.
|
| - *
|
| - * Licensed under the Eclipse Public License v1.0 (the "License"); you may not
|
| - * use this file except in compliance with the License. You may obtain a copy of
|
| - * the License at
|
| - *
|
| + * Copyright (c) 2012, the Dart project authors.
|
| + *
|
| + * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
|
| + * in compliance with the License. You may obtain a copy of the License at
|
| + *
|
| * http://www.eclipse.org/legal/epl-v10.html
|
| - *
|
| - * Unless required by applicable law or agreed to in writing, software
|
| - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
| - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
| - * License for the specific language governing permissions and limitations under
|
| + *
|
| + * Unless required by applicable law or agreed to in writing, software distributed under the License
|
| + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
| + * or implied. See the License for the specific language governing permissions and limitations under
|
| * the License.
|
| */
|
| package com.google.dart.tools.ui.internal.text.dart;
|
|
|
| import com.google.dart.tools.core.model.CompilationUnit;
|
| +import com.google.dart.tools.ui.DartContextType;
|
| +import com.google.dart.tools.ui.DartDocContextType;
|
| import com.google.dart.tools.ui.DartToolsPlugin;
|
| import com.google.dart.tools.ui.DartX;
|
| -import com.google.dart.tools.ui.DartContextType;
|
| -import com.google.dart.tools.ui.DartDocContextType;
|
| import com.google.dart.tools.ui.TemplateEngine;
|
| import com.google.dart.tools.ui.text.DartPartitions;
|
| import com.google.dart.tools.ui.text.dart.ContentAssistInvocationContext;
|
| @@ -30,6 +28,8 @@
|
| import org.eclipse.core.runtime.IProgressMonitor;
|
| import org.eclipse.jface.text.BadLocationException;
|
| import org.eclipse.jface.text.TextUtilities;
|
| +import org.eclipse.jface.text.contentassist.ICompletionProposal;
|
| +import org.eclipse.jface.text.contentassist.IContextInformation;
|
| import org.eclipse.jface.text.templates.TemplateContextType;
|
| import org.eclipse.jface.text.templates.TemplateProposal;
|
|
|
| @@ -127,8 +127,8 @@
|
| * org.eclipse.core.runtime.IProgressMonitor)
|
| */
|
| @Override
|
| - public List<TemplateProposal> computeCompletionProposals(ContentAssistInvocationContext context,
|
| - IProgressMonitor monitor) {
|
| + public List<ICompletionProposal> computeCompletionProposals(
|
| + ContentAssistInvocationContext context, IProgressMonitor monitor) {
|
| TemplateEngine engine;
|
| try {
|
| String partition = TextUtilities.getContentType(context.getDocument(),
|
| @@ -156,8 +156,8 @@
|
| engine.reset();
|
| engine.complete(javaContext.getViewer(), javaContext.getInvocationOffset(), unit);
|
|
|
| - TemplateProposal[] templateProposals = engine.getResults();
|
| - List<TemplateProposal> result = new ArrayList<TemplateProposal>(
|
| + ICompletionProposal[] templateProposals = engine.getResults();
|
| + List<ICompletionProposal> result = new ArrayList<ICompletionProposal>(
|
| Arrays.asList(templateProposals));
|
|
|
| IDartCompletionProposal[] keyWordResults = javaContext.getKeywordProposals();
|
| @@ -197,7 +197,7 @@
|
|
|
| @SuppressWarnings("rawtypes")
|
| @Override
|
| - public List computeContextInformation(ContentAssistInvocationContext context,
|
| + public List<IContextInformation> computeContextInformation(ContentAssistInvocationContext context,
|
| IProgressMonitor monitor) {
|
| return Collections.EMPTY_LIST;
|
| }
|
|
|