diff options
| author | Noopur Gupta | 2019-04-17 11:43:20 +0000 |
|---|---|---|
| committer | Noopur Gupta | 2019-04-19 06:23:23 +0000 |
| commit | eabd059a8747d8a367a9daf461d5ab0c0979eda1 (patch) | |
| tree | 791a3fddc22abb3d1a45a046389880a107773d89 | |
| parent | 03145adadb0aba8c54b3b31ad539433031fa2667 (diff) | |
| download | eclipse.jdt.ui-eabd059a8747d8a367a9daf461d5ab0c0979eda1.tar.gz eclipse.jdt.ui-eabd059a8747d8a367a9daf461d5ab0c0979eda1.tar.xz eclipse.jdt.ui-eabd059a8747d8a367a9daf461d5ab0c0979eda1.zip | |
Bug 506229: [extract method] Refactor > Extract Method... should fill inI20190422-1800I20190421-1800I20190420-1800I20190419-1800
the method name "extracted"
Change-Id: Id7117d661b07aca6caaadad0335f138f7d53033f
| -rw-r--r-- | org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java index b972dfe2cf..d150f7cd3d 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -109,6 +109,11 @@ public class ExtractMethodInputPage extends UserInputWizardPage { fTextField= createTextInputField(result, SWT.BORDER); fTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + String methodName= fRefactoring.getMethodName(); + if (methodName != null && !methodName.trim().isEmpty()) { + fTextField.setText(methodName); + fTextField.setSelection(0, methodName.length()); + } layouter.perform(label, fTextField, 1); |
