From 054458aedff6ee5656a1b7756c49dbec89cd15d4 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Tue, 26 Feb 2013 23:13:27 +0000 Subject: [PATCH] Remove Inputmappingloc.java from repo git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10445 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../leaves/InputmappingBlock.java | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/fileStructure/leaves/InputmappingBlock.java diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/fileStructure/leaves/InputmappingBlock.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/fileStructure/leaves/InputmappingBlock.java deleted file mode 100644 index ce46e86ee..000000000 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/fileStructure/leaves/InputmappingBlock.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.jme3.gde.materialdefinition.fileStructure.leaves; - -import com.jme3.util.blockparser.Statement; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author Nehon - */ -public class InputMappingBlock extends MappingBlock { - - protected InputMappingBlock(int lineNumber, String line) { - super(lineNumber, line); - } - - public InputMappingBlock(Statement sta, String name) { - this(sta.getLineNumber(), sta.getLine()); - parse(sta); - leftNameSpace = name; - updateLine(); - } - - public InputMappingBlock(String leftVar, String rightVar, String leftVarSwizzle, String rightVarSwizzle, String leftNameSpace,String rightNameSpace, String condition) { - super(0, ""); - this.leftVar = leftVar; - this.rightVar = rightVar; - this.leftVarSwizzle = leftVarSwizzle; - this.leftNameSpace = leftNameSpace; - this.rightVarSwizzle = rightVarSwizzle; - this.rightNameSpace = rightNameSpace; - this.condition = condition; - updateLine(); - } - - @Override - protected final void updateLine() { - this.line = leftVar + (leftVarSwizzle == null ? "" : "." + leftVarSwizzle) + " = " + rightNameSpace + "." + rightVar + (rightVarSwizzle == null ? "" : "." + rightVarSwizzle) + (condition != null ? " : " + condition : ""); - } - - private void parse(Statement sta) { - try { - String[] split = sta.getLine().split(":"); - if (split.length > 1) { - condition = split[1].trim(); - } - String mapping = split[0].trim(); - String[] s = mapping.split("="); - String[] left = s[0].split("\\."); - leftVar = left[0].trim(); - if (left.length > 1) { - leftVarSwizzle = left[1].trim(); - } - String[] right = s[1].split("\\."); - rightNameSpace = right[0].trim(); - rightVar = right[1].trim(); - if (right.length > 2) { - rightVarSwizzle = right[2].trim(); - } - - } catch (ArrayIndexOutOfBoundsException e) { - Logger.getLogger(InputMappingBlock.class.getName()).log(Level.WARNING, "Parsing error line " + sta.getLineNumber() + " : " + sta.getLine()); - } - } -}