Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion org.eclipse.wb.core.java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wb.core.java;singleton:=true
Bundle-Version: 1.13.100.qualifier
Bundle-Version: 1.13.200.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.wb.internal.core.model.creation.CreationSupport;
import org.eclipse.wb.internal.core.model.creation.IImplicitCreationSupport;
import org.eclipse.wb.internal.core.model.variable.NamesManager;
import org.eclipse.wb.internal.core.model.variable.VariableSupport;
import org.eclipse.wb.internal.core.utils.ast.AstEditor;
import org.eclipse.wb.internal.core.utils.check.Assert;
import org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils;
Expand Down Expand Up @@ -239,7 +240,10 @@ private void executeCommands() throws Exception {
*/
private String getVariableName(JavaInfo javaInfo) {
if (javaInfo != null) {
return javaInfo.getVariableSupport().getName();
VariableSupport variableSupport = javaInfo.getVariableSupport();
if (variableSupport.hasName()) {
return variableSupport.getName();
}
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Google, Inc. and others.
* Copyright (c) 2011, 2025 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -37,7 +37,6 @@
import org.eclipse.jdt.core.dom.MethodInvocation;

import org.assertj.core.api.Assertions;
import org.junit.Ignore;
import org.junit.Test;

/**
Expand Down Expand Up @@ -374,7 +373,6 @@ public void test_MOVE_withControl() throws Exception {
"}");
}

@Ignore
@Test
public void test_clipboard() throws Exception {
configureWrapperContents();
Expand Down Expand Up @@ -419,8 +417,8 @@ public void test_clipboard() throws Exception {
" JPanel panel_2 = new JPanel();",
" add(panel_2);",
" {",
" TestWrapper testWrapper = new TestWrapper(panel_2);",
" JButton button = testWrapper.getControl();",
" TestWrapper wrapper = new TestWrapper(panel_2);",
" JButton button = wrapper.getControl();",
" }",
" }",
" }",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Google, Inc. and others.
* Copyright (c) 2011, 2025 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -46,7 +46,6 @@
import org.eclipse.jface.preference.FieldEditor;

import org.apache.commons.lang3.ArrayUtils;
import org.junit.Ignore;
import org.junit.Test;

import javax.swing.JButton;
Expand Down Expand Up @@ -625,7 +624,6 @@ public void test_clipboard_styleProperty() throws Exception {
/**
* {@link ConstructorCreationSupport} should include type arguments into clipboard source.
*/
@Ignore
@Test
public void test_clipboard_typeArguments() throws Exception {
// prepare generic MyButton
Expand Down Expand Up @@ -681,8 +679,8 @@ public void run(ComponentInfo copy) throws Exception {
" add(button);",
" }",
" {",
" MyButton<Double, String> myButton = new MyButton<Double, String>();",
" add(myButton);",
" MyButton<Double, String> button = new MyButton<Double, String>();",
" add(button);",
" }",
" }",
"}");
Expand All @@ -693,7 +691,6 @@ public void run(ComponentInfo copy) throws Exception {
* {@link ConstructorCreationSupport} should support {@link AnonymousClassDeclaration} in
* clipboard source.
*/
@Ignore
@Test
public void test_clipboard_anonymousClassDeclaration() throws Exception {
// prepare generic MyButton
Expand Down Expand Up @@ -750,14 +747,14 @@ public void run(ComponentInfo copy) throws Exception {
" add(button);",
" }",
" {",
" MyButton myButton = new MyButton() {",
" MyButton button = new MyButton() {",
" protected String myStringMethod(int a, double b, String c) {",
" return (String) null;",
" }",
" protected void myVoidMethod() {",
" }",
" };",
" add(myButton);",
" add(button);",
" }",
" }",
"}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Google, Inc. and others.
* Copyright (c) 2011, 2025 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -26,7 +26,6 @@
import org.eclipse.jdt.core.dom.QualifiedName;
import org.eclipse.jdt.core.dom.SimpleName;

import org.junit.Ignore;
import org.junit.Test;

import javax.swing.JFrame;
Expand Down Expand Up @@ -624,7 +623,6 @@ public void test_isDirect_false() throws Exception {
/**
* Test for {@link IClipboardImplicitCreationSupport} implementation.
*/
@Ignore
@Test
public void test_clipboard() throws Exception {
setFileContentSrc(
Expand Down Expand Up @@ -675,9 +673,9 @@ public void test_clipboard() throws Exception {
" myPanel_0.m_button.setEnabled(false);",
" }",
" {",
" MyPanel myPanel = new MyPanel();",
" myPanel.m_button.setEnabled(false);",
" add(myPanel);",
" MyPanel myPanel_0 = new MyPanel();",
" myPanel_0.m_button.setEnabled(false);",
" add(myPanel_0);",
" }",
" }",
"}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.jface.action.IAction;

import org.junit.Ignore;
import org.junit.Test;

/**
Expand Down Expand Up @@ -183,7 +182,6 @@ public Test() {
}""");
}

@Ignore
@Test
public void test_canvas_PASTE() throws Exception {
prepareFlowPanel();
Expand Down Expand Up @@ -239,8 +237,8 @@ public Test() {
FlowPanel panel = new FlowPanel();
add(panel);
{
JButton button = new JButton("A");
panel.add(button);
JButton rootButton = new JButton("A");
panel.add(rootButton);
}
{
JButton existingButton = new JButton();
Expand Down Expand Up @@ -420,7 +418,6 @@ public Test() {
}""");
}

@Ignore
@Test
public void test_tree_PASTE() throws Exception {
prepareFlowPanel();
Expand Down Expand Up @@ -476,8 +473,8 @@ public Test() {
FlowPanel panel = new FlowPanel();
add(panel);
{
JButton button = new JButton("A");
panel.add(button);
JButton rootButton = new JButton("A");
panel.add(rootButton);
}
{
JButton existingButton = new JButton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.eclipse.jface.action.IAction;

import org.junit.Ignore;
import org.junit.Test;

/**
Expand Down Expand Up @@ -109,7 +108,6 @@ public Test() {
canvas.assertPrimarySelected(newButton);
}

@Ignore
@Test
public void test_canvas_PASTE() throws Exception {
prepareSimplePanel();
Expand Down Expand Up @@ -159,8 +157,8 @@ public Test() {
SimplePanel panel = new SimplePanel();
add(panel);
{
JButton button = new JButton("A");
panel.setContent(button);
JButton rootButton = new JButton("A");
panel.setContent(rootButton);
}
}
{
Expand Down Expand Up @@ -348,7 +346,6 @@ public Test() {
tree.assertPrimarySelected(newButton);
}

@Ignore
@Test
public void test_tree_PASTE() throws Exception {
prepareSimplePanel();
Expand Down Expand Up @@ -398,8 +395,8 @@ public Test() {
SimplePanel panel = new SimplePanel();
add(panel);
{
JButton button = new JButton("A");
panel.setContent(button);
JButton rootButton = new JButton("A");
panel.setContent(rootButton);
}
}
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011 Google, Inc.
* Copyright (c) 2011, 2025 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -40,7 +40,6 @@
import static org.mockito.Mockito.when;

import org.assertj.core.api.Assertions;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.InOrder;

Expand Down Expand Up @@ -626,7 +625,6 @@ public void test_MOVE() throws Exception {
/**
* {@link SimpleContainer} should automatically copy its child into clipboard.
*/
@Ignore
@Test
public void test_clipboard() throws Exception {
prepareSimplePanel();
Expand Down Expand Up @@ -667,11 +665,11 @@ public void test_clipboard() throws Exception {
" }",
" }",
" {",
" SimplePanel simplePanel = new SimplePanel();",
" add(simplePanel);",
" SimplePanel panel = new SimplePanel();",
" add(panel);",
" {",
" JButton button = new JButton();",
" simplePanel.setContent(button);",
" panel.setContent(button);",
" }",
" }",
" }",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.eclipse.gef.EditPart;
import org.eclipse.jface.action.IAction;

import org.junit.Ignore;
import org.junit.Test;

/**
Expand Down Expand Up @@ -83,7 +82,6 @@ public Test() {
/**
* Test for copy/paste single component.
*/
@Ignore
@Test
public void test_copySingle() throws Exception {
ContainerInfo panel = openContainer("""
Expand Down Expand Up @@ -121,8 +119,8 @@ public Test() {
public class Test extends JPanel {
public Test() {
{
JButton button = new JButton();
add(button);
JButton btn = new JButton();
add(btn);
}
{
JButton btn = new JButton();
Expand All @@ -137,7 +135,6 @@ public Test() {
* If container and its child are selected, then only container should be copied, it will copy
* child automatically.
*/
@Ignore
@Test
public void test_copyParentAndItsChild() throws Exception {
ContainerInfo panel = openContainer("""
Expand Down Expand Up @@ -180,11 +177,11 @@ public Test() {
public class Test extends JPanel {
public Test() {
{
JPanel panel = new JPanel();
add(panel);
JPanel inner = new JPanel();
add(inner);
{
JButton button = new JButton();
panel.add(button);
inner.add(button);
}
}
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011 Google, Inc.
* Copyright (c) 2011, 2025 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -18,7 +18,6 @@
import org.eclipse.wb.internal.swt.model.widgets.CompositeInfo;
import org.eclipse.wb.tests.designer.rcp.model.forms.AbstractFormsTest;

import org.junit.Ignore;
import org.junit.Test;

/**
Expand All @@ -41,7 +40,6 @@ public void _test_exit() throws Exception {
// Tests
//
////////////////////////////////////////////////////////////////////////////
@Ignore
@Test
public void test_simpleSingleControl() throws Exception {
CompositeInfo shell =
Expand Down Expand Up @@ -92,9 +90,9 @@ public void test_simpleSingleControl() throws Exception {
" {",
" Composite composite = new Composite(this, SWT.NONE);",
" {",
" TableWrapLayout tableWrapLayout = new TableWrapLayout();",
" tableWrapLayout.topMargin = 20;",
" composite.setLayout(tableWrapLayout);",
" TableWrapLayout layout = new TableWrapLayout();",
" layout.topMargin = 20;",
" composite.setLayout(layout);",
" }",
" {",
" Button button = new Button(composite, SWT.NONE);",
Expand All @@ -104,7 +102,6 @@ public void test_simpleSingleControl() throws Exception {
"}");
}

@Ignore
@Test
public void test_grid2x2() throws Exception {
CompositeInfo shell =
Expand Down Expand Up @@ -170,9 +167,9 @@ public void test_grid2x2() throws Exception {
" {",
" Composite composite = new Composite(this, SWT.NONE);",
" {",
" TableWrapLayout tableWrapLayout = new TableWrapLayout();",
" tableWrapLayout.numColumns = 2;",
" composite.setLayout(tableWrapLayout);",
" TableWrapLayout layout = new TableWrapLayout();",
" layout.numColumns = 2;",
" composite.setLayout(layout);",
" }",
" {",
" Button button = new Button(composite, SWT.NONE);",
Expand Down
Loading
Loading