diff --git a/.classpath b/.classpath index b862a296d38fe04269faeee6c9d77d11ff77380d..f73077453610026dd1e8c8c33bd8688b8b69adb7 100644 --- a/.classpath +++ b/.classpath @@ -1,7 +1,27 @@ - + + + + + + + + + + + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..11f6e462df7b697da0744bef232871f1aa1b0cb3 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF index f2b4d70d85caedf1e498f9947030daff5bcfcdd8..8a4ac067110c773697eb7bda86e927ccc32527e2 100644 --- a/META-INF/MANIFEST.MF +++ b/META-INF/MANIFEST.MF @@ -7,6 +7,28 @@ Bundle-Activator: cn.edu.hit.statisticalanalysis.app.Activator Bundle-Vendor: cn.edu.hit.asmt Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, - org.eclipse.nebula.widgets.nattable.core;bundle-version="1.6.0" + org.eclipse.nebula.widgets.nattable.core;bundle-version="1.6.0", + org.eclipse.swt Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy +Bundle-ClassPath: lib/activation-1.1.1.jar, + lib/commons-codec-1.13.jar, + lib/commons-collections4-4.4.jar, + lib/commons-compress-1.19.jar, + lib/commons-logging-1.2.jar, + lib/commons-math3-3.6.1.jar, + lib/curvesapi-1.06.jar, + lib/jaxb-api-2.3.1.jar, + lib/jaxb-core-2.3.0.1.jar, + lib/jaxb-impl-2.3.2.jar, + lib/junit-4.12.jar, + lib/log4j-1.2.17.jar, + lib/poi-4.1.2.jar, + lib/poi-examples-4.1.2.jar, + lib/poi-excelant-4.1.2.jar, + lib/poi-ooxml-4.1.2.jar, + lib/poi-ooxml-schemas-4.1.2.jar, + lib/poi-scratchpad-4.1.2.jar, + lib/SparseBitSet-1.2.jar, + lib/xmlbeans-3.1.0.jar, + . diff --git a/build.properties b/build.properties index 78d73f7600944d019a04ca86a3e594bdf562fcaa..7490d84e2d6f457db134edd08586ca17bb43b3c0 100644 --- a/build.properties +++ b/build.properties @@ -2,4 +2,24 @@ source.. = src/ output.. = bin/ bin.includes = plugin.xml,\ META-INF/,\ - . + .,\ + lib/activation-1.1.1.jar,\ + lib/commons-codec-1.13.jar,\ + lib/commons-collections4-4.4.jar,\ + lib/commons-compress-1.19.jar,\ + lib/commons-logging-1.2.jar,\ + lib/commons-math3-3.6.1.jar,\ + lib/curvesapi-1.06.jar,\ + lib/jaxb-api-2.3.1.jar,\ + lib/jaxb-core-2.3.0.1.jar,\ + lib/jaxb-impl-2.3.2.jar,\ + lib/junit-4.12.jar,\ + lib/log4j-1.2.17.jar,\ + lib/poi-4.1.2.jar,\ + lib/poi-examples-4.1.2.jar,\ + lib/poi-excelant-4.1.2.jar,\ + lib/poi-ooxml-4.1.2.jar,\ + lib/poi-ooxml-schemas-4.1.2.jar,\ + lib/poi-scratchpad-4.1.2.jar,\ + lib/SparseBitSet-1.2.jar,\ + lib/xmlbeans-3.1.0.jar diff --git a/src/cn/edu/hit/statisticalanalysis/dataprovider/TwoDimensionalArrayDataProvider.java b/src/cn/edu/hit/statisticalanalysis/dataprovider/TwoDimensionalArrayDataProvider.java index 3698b509108f18b8dc0a5e26b2c4b8b7e64e58f4..2c62d0a18254ddfaf31e40bcac07b5eeb8f7660c 100644 --- a/src/cn/edu/hit/statisticalanalysis/dataprovider/TwoDimensionalArrayDataProvider.java +++ b/src/cn/edu/hit/statisticalanalysis/dataprovider/TwoDimensionalArrayDataProvider.java @@ -6,7 +6,14 @@ public class TwoDimensionalArrayDataProvider implements IDataProvider{ String data[][] = null; public TwoDimensionalArrayDataProvider(String[][] data){ - this.data = data; + int row=data.length; + int column=data[0].length; + String[][] dataT=new String[column][row]; + for(int i=0;i columnData=null; + private int row=0; + private int column=0; + @Override public Object execute(ExecutionEvent event) throws ExecutionException { // TODO 自动生成的方法存根 System.out.println(" RegressionLinearHandler execute ..."); + + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + IViewPart[] regressionView1=page.getViews(); + DataView regressionView=(DataView)regressionView1[0]; + columnData=getColumnData(regressionView.getUpData()); + + Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + WizardDialog dialog=new WizardDialog(shell,new LEWizard(columnData)); + dialog.open(); + + return null; } + public Map getColumnData(String[][] data){ + Map map = new LinkedHashMap(); +// 获取二维数组的行,就是Map中值String[]的长度 + int rows=data.length; + row=rows; + System.out.println("row"+rows); +// 获得二维数组的列,就是Map中键的个数 + int columns=data[0]!=null?data[0].length:0; + System.out.println("column"+columns); + label: + for(int j=0;j list=new ArrayList<>(); + for(int i=0;i columnData=null; + private int row=0; + private int column=0; + @Override public Object execute(ExecutionEvent event) throws ExecutionException { // TODO 自动生成的方法存根 System.out.println(" RegressionLinearHandler execute ..."); + + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + IViewPart[] regressionView1=page.getViews(); + DataView regressionView=(DataView)regressionView1[0]; + columnData=getColumnData(regressionView.getUpData()); + + Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + WizardDialog dialog=new WizardDialog(shell,new LinearWizardSquare(columnData)); + dialog.open(); + return null; } + public Map getColumnData(String[][] data){ + Map map = new LinkedHashMap(); +// 获取二维数组的行,就是Map中值String[]的长度 + int rows=data.length; + row=rows; + System.out.println("row"+rows); +// 获得二维数组的列,就是Map中键的个数 + int columns=data[0]!=null?data[0].length:0; + System.out.println("column"+columns); + label: + for(int j=0;j list=new ArrayList<>(); + for(int i=0;i columnData=null; + private int row=0; + private int column=0; + @Override public Object execute(ExecutionEvent event) throws ExecutionException { // TODO 自动生成的方法存根 System.out.println(" RegressionLinearHandler execute ..."); + + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + IViewPart[] regressionView1=page.getViews(); + DataView regressionView=(DataView)regressionView1[0]; + columnData=getColumnData(regressionView.getUpData()); + + Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + WizardDialog dialog=new WizardDialog(shell,new LogisticWizard(columnData)); + dialog.open(); + return null; } + public Map getColumnData(String[][] data){ + Map map = new LinkedHashMap(); +// 获取二维数组的行,就是Map中值String[]的长度 + int rows=data.length; + row=rows; + System.out.println("row"+rows); +// 获得二维数组的列,就是Map中键的个数 + int columns=data[0]!=null?data[0].length:0; + System.out.println("column"+columns); + label: + for(int j=0;j list=new ArrayList<>(); + for(int i=0;i columnData=null; + private int row=0; + private int column=0; + @Override public Object execute(ExecutionEvent event) throws ExecutionException { // TODO 自动生成的方法存根 System.out.println(" RegressionLinearHandler execute ..."); + + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + IViewPart[] regressionView1=page.getViews(); + DataView regressionView=(DataView)regressionView1[0]; + columnData=getColumnData(regressionView.getUpData()); + + Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + WizardDialog dialog=new WizardDialog(shell,new PolyWizardSquare(columnData)); + dialog.open(); + return null; } + public Map getColumnData(String[][] data){ + Map map = new LinkedHashMap(); +// 获取二维数组的行,就是Map中值String[]的长度 + int rows=data.length; + row=rows; + System.out.println("row"+rows); +// 获得二维数组的列,就是Map中键的个数 + int columns=data[0]!=null?data[0].length:0; + System.out.println("column"+columns); + label: + for(int j=0;j list=new ArrayList<>(); + for(int i=0;i columnData=null; + private int row=0; + private int column=0; + @Override public Object execute(ExecutionEvent event) throws ExecutionException { // TODO 自动生成的方法存根 System.out.println(" RegressionLinearHandler execute ..."); + + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + IViewPart[] regressionView1=page.getViews(); + DataView regressionView=(DataView)regressionView1[0]; + columnData=getColumnData(regressionView.getUpData()); + + Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + WizardDialog dialog=new WizardDialog(shell,new TreSurfWizardSquare(columnData)); + dialog.open(); + return null; } + public Map getColumnData(String[][] data){ + Map map = new LinkedHashMap(); +// 获取二维数组的行,就是Map中值String[]的长度 + int rows=data.length; + row=rows; + System.out.println("row"+rows); +// 获得二维数组的列,就是Map中键的个数 + int columns=data[0]!=null?data[0].length:0; + System.out.println("column"+columns); + label: + for(int j=0;j list=new ArrayList<>(); + for(int i=0;i