/** * Returns a deep copy of this color scheme. * * @return The copy. */ @Override public Object clone() { SyntaxScheme shcs = null; try { shcs = (SyntaxScheme)super.clone(); } catch (CloneNotSupportedException cnse) { // Never happens cnse.printStackTrace(); return null; } shcs.styles = new Style[styles.length]; for (int i=0; i<styles.length; i++) { Style s = styles[i]; if (s!=null) { shcs.styles[i] = (Style)s.clone(); } } return shcs; }
/** * Returns a deep copy of this color scheme. * * @return The copy. */ public Object clone() { SyntaxScheme shcs = null; try { shcs = (SyntaxScheme)super.clone(); } catch (CloneNotSupportedException cnse) { // Never happens cnse.printStackTrace(); return null; } shcs.styles = new Style[Token.NUM_TOKEN_TYPES]; for (int i=0; i<Token.NUM_TOKEN_TYPES; i++) { Style s = styles[i]; if (s!=null) { shcs.styles[i] = (Style)s.clone(); } } return shcs; }
/** * Returns a deep copy of this color scheme. * * @return The copy. */ public Object clone() { SyntaxScheme shcs = null; try { shcs = (SyntaxScheme)super.clone(); } catch (CloneNotSupportedException cnse) { // Never happens cnse.printStackTrace(); return null; } shcs.styles = new Style[Token.NUM_TOKEN_TYPES]; for (int i=0; i<Token.NUM_TOKEN_TYPES; i++) { Style s = styles[i]; if (s!=null) { shcs.styles[i] = (Style)s.clone(); } } return shcs; }
/** * Returns a deep copy of this color scheme. * * @return The copy. */ @Override public Object clone() { SyntaxScheme shcs = null; try { shcs = (SyntaxScheme)super.clone(); } catch (CloneNotSupportedException cnse) { // Never happens cnse.printStackTrace(); return null; } shcs.styles = new Style[styles.length]; for (int i=0; i<styles.length; i++) { Style s = styles[i]; if (s!=null) { shcs.styles[i] = (Style)s.clone(); } } return shcs; }
public Object clone() { SyntaxScheme shcs = null; shcs = (SyntaxScheme) super.clone(); shcs.styles = new Style[SquirrelTokenMarker.getNumTokenTypes()]; for (int i = 0; i < SquirrelTokenMarker.getNumTokenTypes(); i++) { Style s = styles[i]; if (s != null) { shcs.styles[i] = (Style) s.clone(); } } return shcs; }