Skip to content

Commit

Permalink
update to 2024-06 (#106)
Browse files Browse the repository at this point in the history
* update and adopt to 2024-06
  • Loading branch information
carstenartur authored Sep 22, 2024
1 parent e7b071f commit 47b11cd
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 255 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
<repository>
<id>justj</id>
<layout>p2</layout>
<url>https://download.eclipse.org/justj/jres/17/updates/release/latest/</url>
<url>https://download.eclipse.org/justj/jres/21/updates/release/latest/</url>
</repository>
<repository>
<id>eclipse</id>
<layout>p2</layout>
<url>https://download.eclipse.org/releases/2022-09</url>
<url>https://download.eclipse.org/releases/2024-06</url>
</repository>
<repository>
<id>babel</id>
Expand All @@ -67,7 +67,7 @@
<repository>
<id>orbit</id>
<layout>p2</layout>
<url>https://download.eclipse.org/tools/orbit/downloads/drops/R20220830213456/repository/</url>
<url>https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository/</url>
</repository>
<repository>
<id>swtbot</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,30 @@
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.CompilationUnitRewriteOperation;
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.sandbox.jdt.internal.corext.fix.UseExplicitEncodingFixCore;
import org.sandbox.jdt.internal.corext.fix.helper.AbstractExplicitEncoding.ChangeBehavior;

public class UseExplicitEncodingCleanUpCore extends AbstractCleanUpCore {
public class UseExplicitEncodingCleanUpCore extends AbstractCleanUp {
public UseExplicitEncodingCleanUpCore(final Map<String, String> options) {
super(options);
}
public UseExplicitEncodingCleanUpCore() {
}

@Override
public CleanUpRequirementsCore getRequirementsCore() {
return new CleanUpRequirementsCore(requireAST(), false, false, null);
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(requireAST(), false, false, null);
}

public boolean requireAST() {
return isEnabled(EXPLICITENCODING_CLEANUP)&& !computeFixSet().isEmpty();
}
@Override
public ICleanUpFixCore createFixCore(final CleanUpContextCore context) throws CoreException {
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
CompilationUnit compilationUnit= context.getAST();
if (compilationUnit == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,18 @@
*******************************************************************************/
package org.sandbox.jdt.internal.ui.fix;

import java.util.Collections;
import java.util.Map;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.internal.ui.fix.CleanUpFixWrapper;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpOptions;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCoreWrapper;
/**
*/
public class UseFunctionalCallCleanUp extends AbstractCleanUp {
private final UseFunctionalCallCleanUpCore coreCleanUp= new UseFunctionalCallCleanUpCore();
public class UseFunctionalCallCleanUp extends AbstractCleanUpCoreWrapper<UseFunctionalCallCleanUpCore> {
public UseFunctionalCallCleanUp(final Map<String, String> options) {
setOptions(options);
super(options, new UseFunctionalCallCleanUpCore());
}

public UseFunctionalCallCleanUp() {
}
@Override
public void setOptions(final CleanUpOptions options) {
coreCleanUp.setOptions(options);
}
@Override
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(coreCleanUp.getRequirementsCore());
}
@Override
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
ICleanUpFixCore fixCore= coreCleanUp.createFixCore(context);
return fixCore == null ? null : new CleanUpFixWrapper(fixCore);
}
@Override
public String[] getStepDescriptions() {
return coreCleanUp.getStepDescriptions();
}
@Override
public String getPreview() {
return coreCleanUp.getPreview();
this(Collections.EMPTY_MAP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.manipulation.CleanUpContextCore;
import org.eclipse.jdt.core.manipulation.CleanUpRequirementsCore;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.CompilationUnitRewriteOperation;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.sandbox.jdt.internal.corext.fix.UseFunctionalCallFixCore;

public class UseFunctionalCallCleanUpCore extends AbstractCleanUpCore {
public class UseFunctionalCallCleanUpCore extends AbstractCleanUp {
public UseFunctionalCallCleanUpCore(final Map<String, String> options) {
super(options);
}
Expand All @@ -48,16 +48,16 @@ public UseFunctionalCallCleanUpCore() {
}

@Override
public CleanUpRequirementsCore getRequirementsCore() {
return new CleanUpRequirementsCore(requireAST(), false, false, null);
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(requireAST(), false, false, null);
}

public boolean requireAST() {
return isEnabled(USEFUNCTIONALLOOP_CLEANUP);
}

@Override
public ICleanUpFixCore createFixCore(final CleanUpContextCore context) throws CoreException {
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
CompilationUnit compilationUnit = context.getAST();
if (compilationUnit == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,19 @@
*******************************************************************************/
package org.sandbox.jdt.internal.ui.fix;

import java.util.Collections;
import java.util.Map;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.internal.ui.fix.CleanUpFixWrapper;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpOptions;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCoreWrapper;

/**
*/
public class JFaceCleanUp extends AbstractCleanUp {
private final JFaceCleanUpCore coreCleanUp= new JFaceCleanUpCore();

public class JFaceCleanUp extends AbstractCleanUpCoreWrapper<JFaceCleanUpCore> {
public JFaceCleanUp(final Map<String, String> options) {
setOptions(options);
super(options, new JFaceCleanUpCore());
}

/**
*
*/
public JFaceCleanUp() {
}

@Override
public void setOptions(final CleanUpOptions options) {
coreCleanUp.setOptions(options);
}

@Override
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(coreCleanUp.getRequirementsCore());
}

@Override
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
ICleanUpFixCore fixCore= coreCleanUp.createFixCore(context);
return fixCore == null ? null : new CleanUpFixWrapper(fixCore);
}

@Override
public String[] getStepDescriptions() {
return coreCleanUp.getStepDescriptions();
}

@Override
public String getPreview() {
return coreCleanUp.getPreview();
this(Collections.EMPTY_MAP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.manipulation.CleanUpContextCore;
import org.eclipse.jdt.core.manipulation.CleanUpRequirementsCore;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.CompilationUnitRewriteOperation;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.sandbox.jdt.internal.corext.fix.JfaceCleanUpFixCore;

public class JFaceCleanUpCore extends AbstractCleanUpCore {
public class JFaceCleanUpCore extends AbstractCleanUp {
public JFaceCleanUpCore(final Map<String, String> options) {
super(options);
}
Expand All @@ -50,16 +50,16 @@ public JFaceCleanUpCore() {
}

@Override
public CleanUpRequirementsCore getRequirementsCore() {
return new CleanUpRequirementsCore(requireAST(), false, false, null);
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(requireAST(), false, false, null);
}

public boolean requireAST() {
return isEnabled(JFACE_CLEANUP);
}

@Override
public ICleanUpFixCore createFixCore(final CleanUpContextCore context) throws CoreException {
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
CompilationUnit compilationUnit= context.getAST();
if (compilationUnit == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@
*******************************************************************************/
package org.sandbox.jdt.internal.ui.fix;

import java.util.Collections;
import java.util.Map;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.internal.ui.fix.CleanUpFixWrapper;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpOptions;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCoreWrapper;

/**
* New static methods to ease Status creation
Expand Down Expand Up @@ -59,39 +53,12 @@
*
*
*/
public class SimplifyPlatformStatusCleanUp extends AbstractCleanUp {
private final SimplifyPlatformStatusCleanUpCore coreCleanUp= new SimplifyPlatformStatusCleanUpCore();

public class SimplifyPlatformStatusCleanUp extends AbstractCleanUpCoreWrapper<SimplifyPlatformStatusCleanUpCore> {
public SimplifyPlatformStatusCleanUp(final Map<String, String> options) {
setOptions(options);
super(options, new SimplifyPlatformStatusCleanUpCore());
}

public SimplifyPlatformStatusCleanUp() {
}

@Override
public void setOptions(final CleanUpOptions options) {
coreCleanUp.setOptions(options);
}

@Override
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(coreCleanUp.getRequirementsCore());
}

@Override
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
ICleanUpFixCore fixCore= coreCleanUp.createFixCore(context);
return fixCore == null ? null : new CleanUpFixWrapper(fixCore);
}

@Override
public String[] getStepDescriptions() {
return coreCleanUp.getStepDescriptions();
}

@Override
public String getPreview() {
return coreCleanUp.getPreview();
this(Collections.EMPTY_MAP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.manipulation.CleanUpContextCore;
import org.eclipse.jdt.core.manipulation.CleanUpRequirementsCore;
import org.eclipse.jdt.core.manipulation.ICleanUpFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore;
import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.CompilationUnitRewriteOperation;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUpCore;
import org.eclipse.jdt.internal.ui.fix.AbstractCleanUp;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
import org.sandbox.jdt.internal.corext.fix.SimplifyPlatformStatusFixCore;

public class SimplifyPlatformStatusCleanUpCore extends AbstractCleanUpCore {
public class SimplifyPlatformStatusCleanUpCore extends AbstractCleanUp {
public SimplifyPlatformStatusCleanUpCore(final Map<String, String> options) {
super(options);
}
Expand All @@ -48,16 +48,16 @@ public SimplifyPlatformStatusCleanUpCore() {
}

@Override
public CleanUpRequirementsCore getRequirementsCore() {
return new CleanUpRequirementsCore(requireAST(), false, false, null);
public CleanUpRequirements getRequirements() {
return new CleanUpRequirements(requireAST(), false, false, null);
}

public boolean requireAST() {
return isEnabled(SIMPLIFY_STATUS_CLEANUP);
}

@Override
public ICleanUpFixCore createFixCore(final CleanUpContextCore context) throws CoreException {
public ICleanUpFix createFix(final CleanUpContext context) throws CoreException {
CompilationUnit compilationUnit= context.getAST();
if (compilationUnit == null) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion sandbox_product/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
Description of sandbox category
</description>
</category-def>
<repository-reference location="https://download.eclipse.org/releases/2022-09/" enabled="true" />
<repository-reference location="https://download.eclipse.org/releases/2024-06/" enabled="true" />
<repository-reference location="https://download.eclipse.org/technology/babel/update-site/latest/" enabled="true" />
</site>
6 changes: 3 additions & 3 deletions sandbox_product/sandbox.product
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
</launcher>

<vm>
<linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</linux>
<macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</macos>
<windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</windows>
<linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21</linux>
<macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21</macos>
<windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21</windows>
</vm>

<license>
Expand Down
Loading

0 comments on commit 47b11cd

Please sign in to comment.