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

Side by Side Diff: plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/launcher/ScriptMappingTab.java

Issue 10829181: Redesign TabBase to get rid of mandatory inheritance of dialog element interfaces (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: fcr 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.debug.ui.launcher; 5 package org.chromium.debug.ui.launcher;
6 6
7 import java.util.ArrayList; 7 import java.util.ArrayList;
8 import java.util.Collection; 8 import java.util.Collection;
9 import java.util.Collections; 9 import java.util.Collections;
10 import java.util.HashMap; 10 import java.util.HashMap;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 protected MessageData isValidImpl(ILaunchConfiguration config) { 355 protected MessageData isValidImpl(ILaunchConfiguration config) {
356 try { 356 try {
357 LaunchParams.PredefinedSourceWrapperIds.resolveEntries(config); 357 LaunchParams.PredefinedSourceWrapperIds.resolveEntries(config);
358 } catch (CoreException e) { 358 } catch (CoreException e) {
359 return new MessageData(false, 359 return new MessageData(false,
360 NLS.bind(Messages.ScriptMappingTab_UNRESOLVED_ERROR_MESSAGE, e.getMess age())); 360 NLS.bind(Messages.ScriptMappingTab_UNRESOLVED_ERROR_MESSAGE, e.getMess age()));
361 } 361 }
362 return null; 362 return null;
363 } 363 }
364 364
365 protected List<? extends TabField<?, ?, Elements, Params>> getTabFields() { 365 protected TabFieldList<Elements, Params> getTabFields() {
366 return TAB_FIELDS; 366 return TAB_FIELDS;
367 } 367 }
368 368
369 static final List<? extends TabField<?, ?, Elements, Params>> TAB_FIELDS; 369 static final TabFieldList<Elements, Params> TAB_FIELDS;
370 static { 370 static {
371 List<TabField<?, ?, Elements, Params>> list = 371 List<TabField<?, ?, Elements, Params>> list =
372 new ArrayList<ChromiumRemoteTab.TabField<?, ?, Elements, Params>>(4); 372 new ArrayList<ChromiumRemoteTab.TabField<?, ?, Elements, Params>>(4);
373 373
374 list.add(new TabField<String, LookupMode, Elements, Params>( 374 list.add(new TabField<String, LookupMode, Elements, Params>(
375 LaunchParams.SOURCE_LOOKUP_MODE, TypedMethods.STRING, 375 LaunchParams.SOURCE_LOOKUP_MODE, TypedMethods.STRING,
376 new FieldAccess<LookupMode, Elements>() { 376 new FieldAccess<LookupMode, Elements>() {
377 @Override 377 @Override
378 void setValue(LookupMode value, Elements tabElements) { 378 void setValue(LookupMode value, Elements tabElements) {
379 tabElements.getLookupMode().select(value); 379 tabElements.getLookupMode().select(value);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 result = new ArrayList<String>( 420 result = new ArrayList<String>(
421 IPredefinedSourceWrapProvider.Access.getEntries().keySet()); 421 IPredefinedSourceWrapProvider.Access.getEntries().keySet());
422 } else { 422 } else {
423 result = Collections.emptyList(); 423 result = Collections.emptyList();
424 } 424 }
425 return result; 425 return result;
426 } 426 }
427 }, 427 },
428 LaunchParams.PredefinedSourceWrapperIds.CONVERTER)); 428 LaunchParams.PredefinedSourceWrapperIds.CONVERTER));
429 429
430 TAB_FIELDS = Collections.unmodifiableList(list); 430 TAB_FIELDS = createFieldListImpl(list);
431 } 431 }
432 } 432 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698