Skip to content

Commit

Permalink
Merge pull request eclipse-platform#172 from noopur2507/BETA_JAVA19
Browse files Browse the repository at this point in the history
Merge master in BETA_JAVA19 branch
  • Loading branch information
noopur2507 authored Jul 20, 2022
2 parents 84d9f4a + 39aa216 commit 80d92c1
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 10 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.ltk.core.refactoring
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ltk.core.refactoring; singleton:=true
Bundle-Version: 3.12.200.qualifier
Bundle-Version: 3.13.0.qualifier
Bundle-Activator: org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.ltk.core.refactoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.ltk</groupId>
<artifactId>org.eclipse.ltk.core.refactoring</artifactId>
<version>3.12.200-SNAPSHOT</version>
<version>3.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
* Copyright (c) 2000, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -503,4 +503,24 @@ public String toString() {
}
return buff.toString();
}

/**
* @return Amount of changed files
* @since 3.13
*/
public int getFilenumber() {
if(fChanges.size()>0) {
if (fChanges.get(0) instanceof CompositeChange) {
CompositeChange obj= (CompositeChange) fChanges.get(0);
return obj.getAmount();
}
return 1;
}
return 0;
}

private int getAmount() {
return fChanges.size();
}

}
2 changes: 1 addition & 1 deletion org.eclipse.ltk.ui.refactoring/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.ltk.ui.refactoring
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ltk.ui.refactoring; singleton:=true
Bundle-Version: 3.12.100.qualifier
Bundle-Version: 3.12.200.qualifier
Bundle-Activator: org.eclipse.ltk.internal.ui.refactoring.RefactoringUIPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.ltk.ui.refactoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.ltk</groupId>
<artifactId>org.eclipse.ltk.ui.refactoring</artifactId>
<version>3.12.100-SNAPSHOT</version>
<version>3.12.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package org.eclipse.ltk.internal.ui.refactoring;

import java.text.Collator;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -292,8 +293,7 @@ public void executed(Action action) {
* Creates a new preview wizard page.
*/
public PreviewWizardPage() {
super(PAGE_NAME);
setDescription(RefactoringUIMessages.PreviewWizardPage_description);
this(false);
}

/**
Expand All @@ -305,7 +305,7 @@ public PreviewWizardPage() {
*/
public PreviewWizardPage(boolean wizard) {
super(PAGE_NAME, wizard);
setDescription(RefactoringUIMessages.PreviewWizardPage_description);
setDescription(RefactoringUIMessages.PreviewWizardPage_description_s);
}

/**
Expand Down Expand Up @@ -561,6 +561,12 @@ protected void setTreeViewerInput() {
PreviewNode input= null;
if (fTreeViewerInputChange != null) {
input= AbstractChangeNode.createNode(null, fTreeViewerInputChange);
int filenumber= fTreeViewerInputChange.getFilenumber();
String fullDescription= RefactoringUIMessages.PreviewWizardPage_description_s;
if (filenumber > 1) {
fullDescription= MessageFormat.format(RefactoringUIMessages.PreviewWizardPage_description_m, String.valueOf(filenumber));
}
setDescription(fullDescription);
}
fTreeViewer.setInput(input);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ public final class RefactoringUIMessages extends NLS {

public static String PreviewWizardPage_changes_filtered2;

public static String PreviewWizardPage_description;
public static String PreviewWizardPage_description_s;

public static String PreviewWizardPage_description_m;

public static String PreviewWizardPage_filterChanges;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ PreviewWizardPage_changes_filter_derived=derived resources hidden
PreviewWizardPage_hideDerived_text=&Hide derived resources
PreviewWizardPage_refactoring= Refactoring
PreviewWizardPage_Internal_error=An unexpected exception while creating a preview. See the error log for more details.
PreviewWizardPage_description= The following changes are necessary to perform the refactoring.
PreviewWizardPage_description_s= The following change to 1 file is necessary to perform the refactoring.
PreviewWizardPage_description_m= The following changes to {0} files are necessary to perform the refactoring.
PreviewWizardPage_changeElementLabelProvider_textFormat= {0} - {1}

PreviewWizardPage_no_source_code_change=The refactoring does not change any source code.
PreviewWizardPage_showAll_text=&Show All
PreviewWizardPage_showAll_description=Show all changes
Expand Down

0 comments on commit 80d92c1

Please sign in to comment.