| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.liveedit; | 5 package org.chromium.debug.ui.liveedit; |
| 6 | 6 |
| 7 import java.util.ArrayList; | 7 import java.util.ArrayList; |
| 8 import java.util.EnumMap; | 8 import java.util.EnumMap; |
| 9 import java.util.List; | 9 import java.util.List; |
| 10 import java.util.Map; | 10 import java.util.Map; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 public Image getImage(Object element) { | 344 public Image getImage(Object element) { |
| 345 return null; | 345 return null; |
| 346 } | 346 } |
| 347 | 347 |
| 348 public String getText(Object element) { | 348 public String getText(Object element) { |
| 349 FunctionNode functionNode = (FunctionNode) element; | 349 FunctionNode functionNode = (FunctionNode) element; |
| 350 SourcePosition position = functionNode.getPosition(side); | 350 SourcePosition position = functionNode.getPosition(side); |
| 351 if (position == null) { | 351 if (position == null) { |
| 352 return "."; //$NON-NLS-1$ | 352 return "."; //$NON-NLS-1$ |
| 353 } else { | 353 } else { |
| 354 if (functionNode.getParent() == null) { | 354 String name = functionNode.getName(); |
| 355 return Messages.LiveEditDiffViewer_SCRIPT; | 355 if (name == null || name.trim().length() == 0) { |
| 356 return Messages.LiveEditDiffViewer_UNNAMED; |
| 356 } else { | 357 } else { |
| 357 String name = functionNode.getName(); | 358 return name; |
| 358 if (name == null || name.trim().length() == 0) { | |
| 359 return Messages.LiveEditDiffViewer_UNNAMED; | |
| 360 } else { | |
| 361 return name; | |
| 362 } | |
| 363 } | 359 } |
| 364 } | 360 } |
| 365 } | 361 } |
| 366 | 362 |
| 367 public void addListener(ILabelProviderListener listener) { | 363 public void addListener(ILabelProviderListener listener) { |
| 368 } | 364 } |
| 369 | 365 |
| 370 public void removeListener(ILabelProviderListener listener) { | 366 public void removeListener(ILabelProviderListener listener) { |
| 371 } | 367 } |
| 372 | 368 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 return result; | 806 return result; |
| 811 } | 807 } |
| 812 | 808 |
| 813 void dispose() { | 809 void dispose() { |
| 814 for (Color color : colorMap.values()) { | 810 for (Color color : colorMap.values()) { |
| 815 color.dispose(); | 811 color.dispose(); |
| 816 } | 812 } |
| 817 } | 813 } |
| 818 } | 814 } |
| 819 } | 815 } |
| OLD | NEW |