rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
} | private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } } |
|
int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); | int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } | public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } } |
double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } } | public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } } |
|
double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; | double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; | public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; } |
return out; } | public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; } |
|
if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; | if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinaryIndexSum(start, middle) + sBinaryIndexSum(middle, finish); | private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); | private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
|
} | private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
|
if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; | if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); | private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); | private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
|
} | private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } } |
|
double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); | double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); | private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } } |
return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); | private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } } |
|
} | private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } } |
|
if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); | if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); | private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } } |
return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); | private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } } |
|
} | private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } } |
|
CalEnv env = new CalEnv(envPrefix, debug); | CalEnvI env = CalEnvFactory.getEnv(envPrefix, debug); | public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); try { HttpSession session = req.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } envPrefix = "org.bedework.app." + appName + "."; namespacePrefix = WebdavUtils.getUrlPrefix(req); namespace = namespacePrefix + "/schema"; CalEnv env = new CalEnv(envPrefix, debug); sysi = (SysIntf)env.getAppObject("sysintfimpl", SysIntf.class); sysi.init(req, envPrefix, account, debug); emitAccess = new EmitAccess(namespacePrefix, xml); } catch (Throwable t) { throw new WebdavIntfException(t); } } |
setCaretPosition(0); | private void setPageHelperMethod(URL url) { try { super.setPage(url); setCaretPosition(0); } catch (Throwable t) { showError(t); } } |
|
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { | private void addSubscription(BwPreferences p, BwView view, BwUser user, BwCalendar cal, boolean display, boolean freeBusy, boolean publicCalendar) throws Throwable { | public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } } |
BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); | BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), display, freeBusy, false); | public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } } |
if (curView == null) { curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); | if (view != null) { view.addSubscription(sub); } if (publicCalendar) { BwView v = new BwView(); v.setName(cal.getName()); v.setOwner(user); v.addSubscription(sub); p.addView(v); | public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } } |
addSubscription(prefs, globals.publicUser, cal, true); | addSubscription(prefs, curView, o, cal, true, false, true); | private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } } |
BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); | addSubscription(prefs, curView, o, cal, true, true, false); | private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } } |
BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); | addSubscription(prefs, null, o, cal, false, false, false); | private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } } |
Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); | cal = (BwCalendar)globals.filterToCal.get((Integer)subit.next()); addSubscription(prefs, curView, o, cal, true, false, false); | private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } } |
} else if (argpar("-fixOwner", args, i)) { i++; globals.fixOwnerAccount = args[i]; | boolean processArgs(String[] args) throws Throwable { if (args == null) { return true; } for (int i = 0; i < args.length; i++) { if (args[i].equals("")) { // null arg generated by ant } else if (args[i].equals("-debug")) { globals.debug = true; } else if (args[i].equals("-ndebug")) { globals.debug = false; } else if (args[i].equals("-debugentity")) { globals.debugEntity = true; } else if (args[i].equals("-ndebugentity")) { globals.debugEntity = false; } else if (args[i].equals("-noarg")) { globals.debug = false; } else if (argpar("-supergroup", args, i)) { i++; globals.superGroupName = args[i]; } else if (argpar("-defaultpubliccal", args, i)) { i++; globals.defaultPublicCalPath = args[i]; trace("Setting null event calendars to " + args[i]); } else if (argpar("-fixOwner", args, i)) { i++; globals.fixOwnerAccount = args[i]; } else if (args[i].equals("-from2p3px")) { globals.from2p3px = true; } else if (argpar("-d", args, i)) { i++; driver = args[i]; } else if (argpar("-i", args, i)) { i++; id = args[i]; } else if (argpar("-p", args, i)) { i++; pw = args[i]; } else if (argpar("-u", args, i)) { i++; url = args[i]; } else if (argpar("-f", args, i)) { i++; fileName = args[i]; } else if (argpar("-timezones", args, i)) { i++; globals.timezonesFilename = args[i]; /* System parameters */ } else if (argpar("-sysname", args, i)) { i++; globals.syspars.setName(args[i]); } else if (argpar("-tzid", args, i)) { i++; globals.syspars.setTzid(args[i]); } else if (argpar("-sysid", args, i)) { i++; globals.syspars.setSystemid(args[i]); } else if (argpar("-publiccalroot", args, i)) { i++; globals.syspars.setPublicCalendarRoot(args[i]); } else if (argpar("-usercalroot", args, i)) { i++; globals.syspars.setUserCalendarRoot(args[i]); } else if (argpar("-defusercal", args, i)) { i++; globals.syspars.setUserDefaultCalendar(args[i]); } else if (argpar("-deftrashcal", args, i)) { i++; globals.syspars.setDefaultTrashCalendar(args[i]); } else if (argpar("-definbox", args, i)) { i++; globals.syspars.setUserInbox(args[i]); } else if (argpar("-defoutbox", args, i)) { i++; globals.syspars.setUserOutbox(args[i]); } else if (argpar("-defuview", args, i)) { i++; globals.syspars.setDefaultUserViewName(args[i]); } else if (argpar("-pu", args, i)) { i++; globals.syspars.setPublicUser(args[i]); } else if (argpar("-httpconnsperuser", args, i)) { i++; globals.syspars.setHttpConnectionsPerUser(intPar(args[i])); globals.sysparsSetHttpConnectionsPerUser = true; } else if (argpar("-httpconnsperhost", args, i)) { i++; globals.syspars.setHttpConnectionsPerHost(intPar(args[i])); globals.sysparsSetHttpConnectionsPerHost = true; } else if (argpar("-httpconns", args, i)) { i++; globals.syspars.setHttpConnections(intPar(args[i])); globals.sysparsSetHttpConnections = true; } else if (argpar("-defuquota", args, i)) { i++; globals.syspars.setDefaultUserQuota(longPar(args[i])); globals.sysparsSetDefaultUserQuota = true; } else if (argpar("-userauthClass", args, i)) { i++; globals.syspars.setUserauthClass(args[i]); } else if (argpar("-mailerClass", args, i)) { i++; globals.syspars.setMailerClass(args[i]); } else if (argpar("-admingroupsClass", args, i)) { i++; globals.syspars.setAdmingroupsClass(args[i]); } else if (argpar("-usergroupsClass", args, i)) { i++; globals.syspars.setUsergroupsClass(args[i]); } else { error("Illegal argument: '" + args[i] + "'"); usage(); return false; } } return true; } |
|
forwardFocusInWindow(); | requestFocusInWindow(); component.requestFocusInWindow(); | public void addTab(IPanel panel) { if (panel == null) { return; } int index = getTabCount(); String title = panel.getTitle(); Icon icon = panel.getIcon(); Component component = panel.getPanelInstance(); if (title == null || title.length() == 0) { title = Messages.getString("TabBar.UNTITLED"); //$NON-NLS-1$ } super.insertTab(title, icon, component, title, index); // super.insertTab removes the component <-> panel // pair from the table if it already was contained table.put(component, panel); setSelectedComponent(component); forwardFocusInWindow(); } |
try { return CalEnv.getProperty(name); } catch (Throwable t) { throw new CalFacadeException(t); } | return env.getProperty(name); | public String getEnvProperty(String name) throws CalFacadeException { try { return CalEnv.getProperty(name); } catch (Throwable t) { throw new CalFacadeException(t); } } |
return getCal().getSyspars(); | return getCal().getSyspars(systemName); | public BwSystem getSyspars() throws CalFacadeException { return getCal().getSyspars(); } |
env = new CalEnv(pars.getEnvPrefix(), debug); | public void init(CalSvcIPars parsParam) throws CalFacadeException { pars = (CalSvcIPars)parsParam.clone(); debug = pars.getDebug(); //if (userAuth != null) { // userAuth.reinitialise(getUserAuthCallBack()); //} if (userGroups != null) { userGroups.init(getGroupsCallBack()); } if (adminGroups != null) { adminGroups.init(getGroupsCallBack()); } try { env = new CalEnv(pars.getEnvPrefix(), debug); if (pars.getPublicAdmin()) { //adminAutoDeleteSponsors = env.getAppBoolProperty("app.autodeletesponsors"); //adminAutoDeleteLocations = env.getAppBoolProperty("app.autodeletelocations"); adminCanEditAllPublicCategories = env.getAppBoolProperty("allowEditAllCategories"); adminCanEditAllPublicLocations = env.getAppBoolProperty("allowEditAllLocations"); adminCanEditAllPublicSponsors = env.getAppBoolProperty("allowEditAllSponsors"); } timezones = getCal().getTimezonesHandler(); /* Nominate our timezone registry */ System.setProperty("net.fortuna.ical4j.timezone.registry", "org.bedework.icalendar.TimeZoneRegistryFactoryImpl"); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } } |
|
LogFile logFile = new LogFile( fileChooser.getSelectedFile(), dataDictionary ); | LogFile logFile = new LogFile( fileChooser.getSelectedFile(), null ); | public void propertyChange(PropertyChangeEvent evt) { if( !evt.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY) ) return; File file = fileChooser.getSelectedFile(); if( file == null || file.isDirectory() ) return; try { LogFile logFile = new LogFile( fileChooser.getSelectedFile(), dataDictionary ); startTime = logFile.getStartTime(); roundDate( startTime, true ); if( startTime != null ) startTimeControl.setValue( startTime ); endTime = logFile.getEndTime(); roundDate( endTime, false ); if( endTime != null ) endTimeControl.setValue( endTime ); } catch (FileNotFoundException e1) { } } |
public void changeAccess(Object o, Collection aces) throws CalFacadeException { | public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { | public void changeAccess(Object o, Collection aces) throws CalFacadeException { checkOpen(); access.changeAccess(o, aces); sess.saveOrUpdate(o); } |
access.changeAccess(o, aces); sess.saveOrUpdate(o); | access.changeAccess(ent, aces); sess.saveOrUpdate(ent); | public void changeAccess(Object o, Collection aces) throws CalFacadeException { checkOpen(); access.changeAccess(o, aces); sess.saveOrUpdate(o); } |
public Collection getAces(Object o) throws CalFacadeException { | public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { | public Collection getAces(Object o) throws CalFacadeException { checkOpen(); return access.getAces(o); } |
return access.getAces(o); | return access.getAces(ent); | public Collection getAces(Object o) throws CalFacadeException { checkOpen(); return access.getAces(o); } |
private void emitAce(Ace ace, boolean denials) throws Throwable { | private boolean emitAce(Ace ace, boolean denials, boolean aceOpen) throws Throwable { | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
boolean emittedWho = false; | boolean tagOpen = false; | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
if (!emittedWho) { | if (!aceOpen) { xml.openTag(WebdavTags.ace); | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
emittedWho = true; | aceOpen = true; | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
xml.openTag(tag); | if (!tagOpen) { xml.openTag(tag); tagOpen = true; } | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
xml.closeTag(tag); | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
|
if (emittedWho) { xml.closeTag(WebdavTags.ace); | if (tagOpen) { xml.closeTag(tag); | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
return aceOpen; | private void emitAce(Ace ace, boolean denials) throws Throwable { Collection privs = ace.getPrivs(); boolean emittedWho = false; QName tag; if (denials) { tag = WebdavTags.deny; } else { tag = WebdavTags.grant; } Iterator it = privs.iterator(); while (it.hasNext()) { Privilege p = (Privilege)it.next(); if (denials == p.getDenial()) { if (!emittedWho) { emitAceWho(ace); emittedWho = true; } xml.openTag(tag); xml.emptyTag(privTags[p.getIndex()]); xml.closeTag(tag); } } if (emittedWho) { xml.closeTag(WebdavTags.ace); } } |
|
xml.openTag(WebdavTags.ace); | private void emitAceWho(Ace ace) throws Throwable { xml.openTag(WebdavTags.ace); boolean invert = ace.getNotWho(); if (ace.getWhoType() == Ace.whoTypeOther) { invert = !invert; } if (invert) { xml.openTag(WebdavTags.invert); } xml.openTag(WebdavTags.principal); int whoType = ace.getWhoType(); /* <!ELEMENT principal (href) | all | authenticated | unauthenticated | property | self)> */ if (whoType == Ace.whoTypeUser) { xml.property(WebdavTags.href, makeUserHref(ace.getWho())); } else if (whoType == Ace.whoTypeGroup) { xml.property(WebdavTags.href, makeGroupHref(ace.getWho())); } else if ((whoType == Ace.whoTypeOwner) || (whoType == Ace.whoTypeOther)) { // Other is !owner xml.openTag(WebdavTags.property); xml.emptyTag(WebdavTags.owner); xml.closeTag(WebdavTags.property); } else if (whoType == Ace.whoTypeUnauthenticated) { xml.emptyTag(WebdavTags.unauthenticated); } else if (whoType == Ace.whoTypeAuthenticated) { xml.emptyTag(WebdavTags.authenticated); } else if (whoType == Ace.whoTypeAll) { xml.emptyTag(WebdavTags.all); } else { throw new CalFacadeException("access.unknown.who"); } xml.closeTag(WebdavTags.principal); if (invert) { xml.closeTag(WebdavTags.invert); } } |
|
emitAce(ace, true); emitAce(ace, false); | boolean aceOpen = emitAce(ace, true, false); if (emitAce(ace, false, aceOpen)) { aceOpen = true; } if (aceOpen) { xml.closeTag(WebdavTags.ace); } | public void emitAces(Collection aces) throws CalFacadeException { try { xml.openTag(WebdavTags.acl); if (aces != null) { Iterator it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next(); emitAce(ace, true); emitAce(ace, false); } } xml.closeTag(WebdavTags.acl); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } } |
rightClickMenu.addSeparator(); rightClickMenu.add(shiftUp); rightClickMenu.add(shiftDown); | public TablePanel() { super(new GridLayout(1, 0)); table.getColumnModel().getColumn(0).setPreferredWidth(150); table.getColumnModel().getColumn(1).setPreferredWidth(150); table.getColumnModel().getColumn(2).setPreferredWidth(10); table.getColumnModel().getColumn(3).setPreferredWidth(150); table.getColumnModel().getColumn(4).setPreferredWidth(50); table.sizeColumnsToFit(-1); final JPopupMenu rightClickMenu = new JPopupMenu(); JMenuItem removeItem = new JMenuItem(Messages.getString("ModuleConfigurationPanel.REMOVE")); //$NON-NLS-1$ removeItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { String id = (String)table.getModel().getValueAt(selected[i], 1); ModuleLoader.unload(id); } } }); rightClickMenu.add(removeItem); table.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { if (e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON3 && table.getSelectedRow() != -1) { rightClickMenu.show(table, e.getX(), e.getY()); } } public void mouseReleased(MouseEvent e) { } }); JScrollPane scrollPane = new JScrollPane(table); add(scrollPane); } |
|
JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { tablePanel.getModel().swap(selected[i]-1, selected[i]); } table.setRowSelectionInterval(selected[0] - 1, selected[selected.length-1] - 1); | tablePanel.shiftSelectedUp(); | public JPanel getButtonPanel() { JPanel p = new JPanel(new GridLayout(0, 3)); JButton remove = new JButton(Messages.getString("ModuleConfigurationPanel.REMOVE")); //$NON-NLS-1$ remove.setToolTipText(Messages.getString("ModuleConfigurationPanel.REMOVE_TOOLTIP")); //$NON-NLS-1$ remove.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { String id = (String)table.getModel().getValueAt(selected[i], 1); ModuleLoader.unload(id); } } }); JButton shiftUp = new JButton(Messages.getString("ModuleConfigurationPanel.UP")); //$NON-NLS-1$ shiftUp.setToolTipText(Messages.getString("ModuleConfigurationPanel.UP_TOOLTIP")); //$NON-NLS-1$ shiftUp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { tablePanel.getModel().swap(selected[i]-1, selected[i]); } table.setRowSelectionInterval(selected[0] - 1, selected[selected.length-1] - 1); } }); JButton shiftDown = new JButton(Messages.getString("ModuleConfigurationPanel.DOWN")); //$NON-NLS-1$ shiftDown.setToolTipText(Messages.getString("ModuleConfigurationPanel.DOWN_TOOLTIP")); //$NON-NLS-1$ shiftDown.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { tablePanel.getModel().swap(selected[i], selected[i]+1); } table.setRowSelectionInterval(selected[0] + 1, selected[selected.length-1] + 1); } }); p.add(remove); p.add(shiftUp); p.add(shiftDown); return p; } |
JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { tablePanel.getModel().swap(selected[i], selected[i]+1); } table.setRowSelectionInterval(selected[0] + 1, selected[selected.length-1] + 1); | tablePanel.shiftSelectedDown(); | public JPanel getButtonPanel() { JPanel p = new JPanel(new GridLayout(0, 3)); JButton remove = new JButton(Messages.getString("ModuleConfigurationPanel.REMOVE")); //$NON-NLS-1$ remove.setToolTipText(Messages.getString("ModuleConfigurationPanel.REMOVE_TOOLTIP")); //$NON-NLS-1$ remove.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { String id = (String)table.getModel().getValueAt(selected[i], 1); ModuleLoader.unload(id); } } }); JButton shiftUp = new JButton(Messages.getString("ModuleConfigurationPanel.UP")); //$NON-NLS-1$ shiftUp.setToolTipText(Messages.getString("ModuleConfigurationPanel.UP_TOOLTIP")); //$NON-NLS-1$ shiftUp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { tablePanel.getModel().swap(selected[i]-1, selected[i]); } table.setRowSelectionInterval(selected[0] - 1, selected[selected.length-1] - 1); } }); JButton shiftDown = new JButton(Messages.getString("ModuleConfigurationPanel.DOWN")); //$NON-NLS-1$ shiftDown.setToolTipText(Messages.getString("ModuleConfigurationPanel.DOWN_TOOLTIP")); //$NON-NLS-1$ shiftDown.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { tablePanel.getModel().swap(selected[i], selected[i]+1); } table.setRowSelectionInterval(selected[0] + 1, selected[selected.length-1] + 1); } }); p.add(remove); p.add(shiftUp); p.add(shiftDown); return p; } |
JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { tablePanel.getModel().swap(selected[i]-1, selected[i]); } table.setRowSelectionInterval(selected[0] - 1, selected[selected.length-1] - 1); | tablePanel.shiftSelectedUp(); | public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = 0; i < selected.length; i++) { tablePanel.getModel().swap(selected[i]-1, selected[i]); } table.setRowSelectionInterval(selected[0] - 1, selected[selected.length-1] - 1); } |
JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { tablePanel.getModel().swap(selected[i], selected[i]+1); } table.setRowSelectionInterval(selected[0] + 1, selected[selected.length-1] + 1); | tablePanel.shiftSelectedDown(); | public void actionPerformed(ActionEvent e) { JTable table = tablePanel.getTable(); int[] selected = table.getSelectedRows(); for (int i = selected.length - 1; i >= 0; i--) { tablePanel.getModel().swap(selected[i], selected[i]+1); } table.setRowSelectionInterval(selected[0] + 1, selected[selected.length-1] + 1); } |
form.getMsg().emit("org.bedework.pubevents.message.category.added"); | form.getMsg().emit("org.bedework.client.message.category.added"); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar != null) { return "delete"; } CalSvcI svci = form.getCalSvcI(); boolean add = form.getAddingCategory(); /** We are just updating from the current form values. */ if (!form.validateCategory()) { return "retry"; } /* if a category with the same name and creator exist in categories table then retrieve its categoryid, otherwise add this category to the database and then retrieve its categoryid. */ BwCategory k = form.getCategory(); if (add) { k.setPublick(true); svci.ensureCategoryExists(k); } else { svci.replaceCategory(k); }// form.updatePrefs(null, null, null, null); if (add) { form.getMsg().emit("org.bedework.pubevents.message.category.added"); } else { form.getMsg().emit("org.bedework.pubevents.message.category.updated"); } return "continue"; } |
form.getMsg().emit("org.bedework.pubevents.message.category.updated"); | form.getMsg().emit("org.bedework.client.message.category.updated"); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar != null) { return "delete"; } CalSvcI svci = form.getCalSvcI(); boolean add = form.getAddingCategory(); /** We are just updating from the current form values. */ if (!form.validateCategory()) { return "retry"; } /* if a category with the same name and creator exist in categories table then retrieve its categoryid, otherwise add this category to the database and then retrieve its categoryid. */ BwCategory k = form.getCategory(); if (add) { k.setPublick(true); svci.ensureCategoryExists(k); } else { svci.replaceCategory(k); }// form.updatePrefs(null, null, null, null); if (add) { form.getMsg().emit("org.bedework.pubevents.message.category.added"); } else { form.getMsg().emit("org.bedework.pubevents.message.category.updated"); } return "continue"; } |
vn = getEnv().getAppOptProperty("app.default.view"); | vn = getEnv().getAppOptProperty("default.view"); | public TimeView getCurTimeView() { /* We might be called before any time is set. Set a week view by default */ try { if (curTimeView == null) { /** Figure out the default from the properties */ String vn; try { vn = getEnv().getAppOptProperty("app.default.view"); if (vn == null) { vn = "week"; } } catch (Throwable t) { System.out.println("Exception setting current view"); vn = "week"; } curViewPeriod = -1; for (int i = 1; i < BedeworkDefs.viewPeriodNames.length; i++) { if (BedeworkDefs.viewPeriodNames[i].startsWith(vn)) { curViewPeriod = i; break; } } if (curViewPeriod < 0) { curViewPeriod = BedeworkDefs.weekView; } Locale loc = Locale.getDefault(); // XXX Locale setViewMcDate(new MyCalendarVO(new Date(System.currentTimeMillis()), loc)); refreshView(); } } catch (Throwable t) { getLog().error("Exception in getCurTimeView", t); } if (curTimeView == null) { getLog().warn("Null time view!!!!!!!!!!!");// } else if (debug) {// getLog().debug("Return a time view"); } return curTimeView; } |
System.out.println("item = " + item); System.out.println("basket = " + basket); | public void removeItem(BasketItem item) { System.out.println("item = " + item); System.out.println("basket = " + basket); if (item == null || basket == null) { return; } if (basket.containsKey(item.getItemID())) { basket.remove(item.getItemID()); } } |
|
for (int i = 2; i < sysLen; i++) { vars[i][0] = keys[i]; vars[i][1] = sysProps.getProperty(keys[i]); | for (int i = 0; i < sysLen; i++) { vars[i+2][0] = keys[i]; vars[i+2][1] = sysProps.getProperty(keys[i]); | private JPanel createMemoryPanel() { Properties sysProps = System.getProperties(); Enumeration sysKeys = sysProps.keys(); int sysLen = sysProps.size(); String[] keys = new String[sysLen]; for (int i = 0; i < sysLen && sysKeys.hasMoreElements(); i++) { keys[i] = (String)sysKeys.nextElement(); } Arrays.sort(keys); String[][] vars = new String[sysLen+2][2]; vars[0][0] = "Program name"; vars[0][1] = EVI.TITLE; vars[1][0] = "Program version"; vars[1][1] = String.valueOf(EVI.VERSION); for (int i = 2; i < sysLen; i++) { vars[i][0] = keys[i]; vars[i][1] = sysProps.getProperty(keys[i]); } JTable table = new JTable(vars, new String[] { Messages.getString("EnvironmentPanel.VARIABLE"), Messages.getString("EnvironmentPanel.VALUE") }) { //$NON-NLS-1$ //$NON-NLS-2$ private static final long serialVersionUID = 2298937007677219773L; public boolean isCellEditable(int x, int y) { return false; } }; JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JPanel panel = new JPanel(new GridLayout(1, 0)); panel.add(scrollPane); return panel; } |
int tmpPrmValueWidth = (tmpPrmValue != null) ? calculateTextFieldWidthForString(tmpPrmLabel) : prmValueWidth; | int tmpPrmValueWidth = (tmpPrmValue != null) ? calculateTextFieldWidthForString(tmpPrmValue) : prmValueWidth; | private void generateLayoutAndAddParameters(IWContext iwc, boolean isMethodInvocation) throws IOException, JRException { int columnWidth = 120; int prmLableWidth = 95; int prmValueWidth = 55; DynamicReportDesign designTemplate = new DynamicReportDesign("GeneratedReport"); if (_dynamicFields != null && _dynamicFields.size() > 0) { if (_queryPK != null) { Iterator iter = _dynamicFields.iterator(); while (iter.hasNext()) { ReportableField element = (ReportableField) iter.next(); String prmName = element.getName(); String tmpPrmLabel = (String) _parameterMap.get(_prmLablePrefix + prmName); String tmpPrmValue = (String) _parameterMap.get(prmName); int tmpPrmLabelWidth = (tmpPrmLabel != null) ? calculateTextFieldWidthForString(tmpPrmLabel) : prmLableWidth; int tmpPrmValueWidth = (tmpPrmValue != null) ? calculateTextFieldWidthForString(tmpPrmLabel) : prmValueWidth; designTemplate.addHeaderParameter(_prmLablePrefix + prmName, tmpPrmLabelWidth, prmName, String.class, tmpPrmValueWidth); } } else { Iterator iter = _dynamicFields.iterator(); while (iter.hasNext()) { ClassDescription element = (ClassDescription) iter.next(); String prmName = element.getName(); String tmpPrmLabel = (String) _parameterMap.get(_prmLablePrefix + prmName); String tmpPrmValue = (String) _parameterMap.get(prmName); int tmpPrmLabelWidth = (tmpPrmLabel != null) ? calculateTextFieldWidthForString(tmpPrmLabel) : prmLableWidth; int tmpPrmValueWidth = (tmpPrmValue != null) ? calculateTextFieldWidthForString(tmpPrmValue) : prmValueWidth; designTemplate.addHeaderParameter(_prmLablePrefix + prmName, tmpPrmLabelWidth, prmName, String.class, tmpPrmValueWidth); } } } if (_extraHeaderParameters != null) { Iterator keyIter = _extraHeaderParameters.keySet().iterator(); Iterator valueIter = _extraHeaderParameters.values().iterator(); while (keyIter.hasNext()) { String keyLabel = (String) keyIter.next(); String valueLabel = (String) valueIter.next(); if (keyIter.hasNext()) { String keyValue = (String) keyIter.next(); String valueValue = (String) valueIter.next(); String tmpPrmLabel = valueLabel; String tmpPrmValue = valueValue; int tmpPrmLabelWidth = (tmpPrmLabel != null) ? calculateTextFieldWidthForString(tmpPrmLabel) : prmLableWidth; int tmpPrmValueWidth = (tmpPrmValue != null) ? calculateTextFieldWidthForString(tmpPrmValue) : prmValueWidth; designTemplate.addHeaderParameter(keyLabel, tmpPrmLabelWidth, keyValue, String.class, tmpPrmValueWidth); } } } if (_allFields != null && _allFields.size() > 0) { //System.out.println("ReportGenerator."); //TMP //TODO get columnspacing (15) and it to columnsWidth; int columnsWidth = columnWidth * _allFields.size() + 15 * (_allFields.size() - 1); //TMP //TODO get page Margins (20) and add them to pageWidth; designTemplate.setPageWidth(columnsWidth + 20 + 20); designTemplate.setColumnWidth(columnsWidth); // Locale currentLocale = iwc.getCurrentLocale(); Iterator iter = _allFields.iterator(); if (isMethodInvocation) { while (iter.hasNext()) { ReportableField field = (ReportableField) iter.next(); String name = field.getName(); _parameterMap.put(name, field.getLocalizedName(currentLocale)); designTemplate.addField(name, field.getValueClass(), columnWidth); } } else { while (iter.hasNext()) { try { QueryFieldPart element = (QueryFieldPart) iter.next(); ReportableField field = new ReportableField(element.getIDOEntityField()); String name = field.getName(); _parameterMap.put(name, field.getLocalizedName(currentLocale)); designTemplate.addField(name, field.getValueClass(), columnWidth); } catch (IDOLookupException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } } } designTemplate.close(); _design = designTemplate.getJasperDesign(iwc); } |
org.eclipse.gmf.internal.codegen.draw2d.GridLayout layoutThis = new org.eclipse.gmf.internal.codegen.draw2d.GridLayout(); | GridLayout layoutThis = new GridLayout(); | public ReferencedMetaclassFigure() { org.eclipse.gmf.internal.codegen.draw2d.GridLayout layoutThis = new org.eclipse.gmf.internal.codegen.draw2d.GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; this.setLayoutManager(layoutThis); this.setFill(true); this.setFillXOR(false); this.setOutline(true); this.setOutlineXOR(false); this.setLineWidth(1); this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); this.setForegroundColor(org.eclipse.draw2d.ColorConstants.gray); createContents(); } |
this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); this.setForegroundColor(org.eclipse.draw2d.ColorConstants.gray); | this.setLineStyle(Graphics.LINE_SOLID); this.setForegroundColor(ColorConstants.gray); | public ReferencedMetaclassFigure() { org.eclipse.gmf.internal.codegen.draw2d.GridLayout layoutThis = new org.eclipse.gmf.internal.codegen.draw2d.GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; this.setLayoutManager(layoutThis); this.setFill(true); this.setFillXOR(false); this.setOutline(true); this.setOutlineXOR(false); this.setLineWidth(1); this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); this.setForegroundColor(org.eclipse.draw2d.ColorConstants.gray); createContents(); } |
org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); | RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new RectangleFigure(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); | referencedMetaclassFigure_FixedLabelPane0.setLineStyle(Graphics.LINE_SOLID); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; | GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = GridLayoutData.CENTER; | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); | CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new CenterLayout(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); | WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new WrapLabel(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); | RectangleFigure referencedMetaclassFigure_LabelPane0 = new RectangleFigure(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); | referencedMetaclassFigure_LabelPane0.setLineStyle(Graphics.LINE_SOLID); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; | GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = GridLayoutData.CENTER; | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); | CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new CenterLayout(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); | WrapLabel referencedMetaclassFigure_className1 = new WrapLabel(); | private void createContents() { org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_FixedLabelPane0.setFill(false); referencedMetaclassFigure_FixedLabelPane0.setFillXOR(false); referencedMetaclassFigure_FixedLabelPane0.setOutline(false); referencedMetaclassFigure_FixedLabelPane0.setOutlineXOR(false); referencedMetaclassFigure_FixedLabelPane0.setLineWidth(1); referencedMetaclassFigure_FixedLabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_FixedLabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_FixedLabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_FixedLabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_FixedLabelPane0, constraintReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_FixedLabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_FixedLabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_FixedLabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_fixed_metaclass1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_fixed_metaclass1.setText("\u00ABmetaclass\u00BB"); referencedMetaclassFigure_FixedLabelPane0.add(referencedMetaclassFigure_fixed_metaclass1); org.eclipse.draw2d.RectangleFigure referencedMetaclassFigure_LabelPane0 = new org.eclipse.draw2d.RectangleFigure(); referencedMetaclassFigure_LabelPane0.setFill(false); referencedMetaclassFigure_LabelPane0.setFillXOR(false); referencedMetaclassFigure_LabelPane0.setOutline(false); referencedMetaclassFigure_LabelPane0.setOutlineXOR(false); referencedMetaclassFigure_LabelPane0.setLineWidth(1); referencedMetaclassFigure_LabelPane0.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData constraintReferencedMetaclassFigure_LabelPane0 = new org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData(); constraintReferencedMetaclassFigure_LabelPane0.verticalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalAlignment = org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData.CENTER; constraintReferencedMetaclassFigure_LabelPane0.horizontalIndent = 0; constraintReferencedMetaclassFigure_LabelPane0.horizontalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.verticalSpan = 1; constraintReferencedMetaclassFigure_LabelPane0.grabExcessHorizontalSpace = true; constraintReferencedMetaclassFigure_LabelPane0.grabExcessVerticalSpace = true; this.add(referencedMetaclassFigure_LabelPane0, constraintReferencedMetaclassFigure_LabelPane0); org.eclipse.uml2.diagram.common.draw2d.CenterLayout layoutReferencedMetaclassFigure_LabelPane0 = new org.eclipse.uml2.diagram.common.draw2d.CenterLayout(); referencedMetaclassFigure_LabelPane0.setLayoutManager(layoutReferencedMetaclassFigure_LabelPane0); org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel referencedMetaclassFigure_className1 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel(); referencedMetaclassFigure_className1.setText(""); referencedMetaclassFigure_LabelPane0.add(referencedMetaclassFigure_className1); setFigureReferencedMetaclassFigure_className(referencedMetaclassFigure_className1); } |
public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureReferencedMetaclassFigure_className() { | public WrapLabel getFigureReferencedMetaclassFigure_className() { | public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureReferencedMetaclassFigure_className() { return fReferencedMetaclassFigure_className; } |
private void setFigureReferencedMetaclassFigure_className(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fig) { | private void setFigureReferencedMetaclassFigure_className(WrapLabel fig) { | private void setFigureReferencedMetaclassFigure_className(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fig) { fReferencedMetaclassFigure_className = fig; } |
setForegroundColor(hasActualMetaclassImport ? org.eclipse.draw2d.ColorConstants.gray : org.eclipse.draw2d.ColorConstants.red); | setForegroundColor(hasActualMetaclassImport ? ColorConstants.gray : ColorConstants.red); | public void setHasActualMetaclassImport(boolean hasActualMetaclassImport) { setForegroundColor(hasActualMetaclassImport ? org.eclipse.draw2d.ColorConstants.gray : org.eclipse.draw2d.ColorConstants.red); } |
hasMetaclass = imported instanceof org.eclipse.uml2.uml.Class && ((org.eclipse.uml2.uml.Class) imported).isMetaclass(); | hasMetaclass = imported instanceof Class && ((Class) imported).isMetaclass(); | private void refreshHasImportedMetaclass(ReferencedMetaclassFigure figure) { ElementImport elementImport = (ElementImport) resolveSemanticElement(); //OCL here (#161545) boolean hasMetaclass = false; if (elementImport != null) { PackageableElement imported = elementImport.getImportedElement(); hasMetaclass = imported instanceof org.eclipse.uml2.uml.Class && ((org.eclipse.uml2.uml.Class) imported).isMetaclass(); } figure.setHasActualMetaclassImport(hasMetaclass); } |
}else{ logger.debug("using default url of " + getURL()); | public static void loadDbProperties(Properties sysProperties, Properties dbProperties) { if(dbProperties.containsKey(DB_SERVER_PORT)) { if(dbProperties.containsKey(DBURL_KEY)) { logger.error("-hsql properties and SOD properties are both specifying the db connection. Using -hsql properties"); } //Use hsqldb properties specified in // http://hsqldb.sourceforge.net/doc/guide/ch04.html String url = "jdbc:hsqldb:hsql://localhost"; if(dbProperties.containsKey(DB_SERVER_PORT)) { url += ":" + dbProperties.getProperty(DB_SERVER_PORT); } url += "/"; if(dbProperties.containsKey("server.dbname.0")) { url += dbProperties.getProperty("server.dbname.0"); } logger.debug("Setting db url to " + url); setURL(url); } else if(sysProperties.containsKey(DBURL_KEY)) { logger.debug("Setting db url to " + sysProperties.getProperty(DBURL_KEY)); setURL(sysProperties.getProperty(DBURL_KEY)); } } |
|
form.getErr().emit("org.bedework.pubevents.error.nosuchsponsor", id); | form.getErr().emit("org.bedework.client.error.nosuchsponsor", id); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** User requested a sponsor from the list. Retrieve it, embed it in * the form so we can display the page */ int id = getIntReqPar(request, "spid", -1); BwSponsor sponsor = null; if (id >= 0) { sponsor = form.getCalSvcI().getSponsor(id); } if (debug) { if (sponsor == null) { logIt("No sponsor with id " + id); } else { logIt("Retrieved sponsor " + sponsor.getId()); } } form.assignAddingSponsor(false); form.setSponsor(sponsor); if (sponsor == null) { form.getErr().emit("org.bedework.pubevents.error.nosuchsponsor", id); return "notFound"; } return "continue"; } |
fw.write("def x := 1; \n self.x"); | fw.write("def x := 1; \n def y := /.tmp; \n ~.x"); | public void setUp() { try { boolean success; at_ = new File("/tmp/at"); success = at_.mkdir(); at_test_ = new File("/tmp/at/test"); success &= at_test_.mkdir(); at_test_testfile_at = new File("/tmp/at/test/testfile.at"); success &= at_test_testfile_at.createNewFile(); if (!success) { fail("could not create test directories and files"); } FileWriter fw = new FileWriter(at_test_testfile_at); fw.write("def x := 1; \n self.x"); fw.close(); } catch (IOException e) { fail(e.getMessage()); } } |
NATNamespace root = new NATNamespace("", "/tmp", OBJDynamicRoot._INSTANCE_); | public void testNamespaces() { // create a 'root' namespace pointing to /tmp NATNamespace root = new NATNamespace("", "/tmp", OBJDynamicRoot._INSTANCE_); // now, try to select the 'at' slot try { ATObject at = root.meta_select(root, AGSymbol.alloc("at")); // the at slot should equal a namespace object assertTrue(at instanceof NATNamespace); assertEquals("<ns:/at>", at.meta_print().javaValue); ATObject test = at.meta_select(at, AGSymbol.alloc("test")); // the test slot should equal a namespace object assertTrue(test instanceof NATNamespace); assertEquals("<ns:/at/test>", test.meta_print().javaValue); // select at.test.test which should load test.at and return 1 ATObject result = test.meta_select(test, AGSymbol.alloc("testfile")); assertEquals(NATNumber.ONE, result); } catch (NATException e) { fail(e.getMessage()); } } |
|
assertTrue(test.meta_respondsTo(AGSymbol.alloc("testfile")).asNativeBoolean().javaValue); assertEquals(test, test.meta_select(test, AGSymbol.alloc("~"))); assertEquals(at, test.meta_select(test, AGSymbol.alloc("^"))); | public void testNamespaces() { // create a 'root' namespace pointing to /tmp NATNamespace root = new NATNamespace("", "/tmp", OBJDynamicRoot._INSTANCE_); // now, try to select the 'at' slot try { ATObject at = root.meta_select(root, AGSymbol.alloc("at")); // the at slot should equal a namespace object assertTrue(at instanceof NATNamespace); assertEquals("<ns:/at>", at.meta_print().javaValue); ATObject test = at.meta_select(at, AGSymbol.alloc("test")); // the test slot should equal a namespace object assertTrue(test instanceof NATNamespace); assertEquals("<ns:/at/test>", test.meta_print().javaValue); // select at.test.test which should load test.at and return 1 ATObject result = test.meta_select(test, AGSymbol.alloc("testfile")); assertEquals(NATNumber.ONE, result); } catch (NATException e) { fail(e.getMessage()); } } |
|
EventPeriod(DateTime start, DateTime end) { | EventPeriod(DateTime start, DateTime end, int type) { | EventPeriod(DateTime start, DateTime end) { this.start = start; this.end = end; } |
this.type = type; | EventPeriod(DateTime start, DateTime end) { this.start = start; this.end = end; } |
|
if (type < that.type) { return -1; } if (type > that.type) { return 1; } | public int compareTo(Object o) { if (!(o instanceof EventPeriod)) { return -1; } EventPeriod that = (EventPeriod)o; int res = start.compareTo(that.start); if (res != 0) { return res; } return end.compareTo(that.end); } |
|
Calintf getCal() throws CalFacadeException { if (cali != null) { return cali; } try { cali = (Calintf)CalEnv.getGlobalObject("calintfclass", Calintf.class); } catch (Throwable t) { throw new CalFacadeException(t); } try { cali.open(); cali.beginTransaction(); boolean userCreated = cali.init(pars.getAuthUser(), pars.getUser(), pars.getPublicAdmin(), getGroups(), pars.getSynchId(), debug); publicUserAccount = cali.getSyspars().getPublicUser(); BwUser auth; if (isGuest()) { auth = getPublicUser(); } else { auth = cali.getUser(pars.getAuthUser()); } if (debug) { trace("Got auth user object " + auth); } dbi = new CalSvcDb(this, auth); if (userCreated) { initUser(auth, cali); } if (debug) { trace("PublicAdmin: " + pars.getPublicAdmin() + " user: " + pars.getUser()); } if (pars.getPublicAdmin()) { dbi.close(); BwUser user = cali.getUser(pars.getUser()); dbi = new CalSvcDb(this, user); } return cali; } finally { cali.endTransaction(); cali.close(); } | Calintf getCal(BwSubscription sub) throws CalFacadeException { return getCal(); | Calintf getCal() throws CalFacadeException { if (cali != null) { return cali; } try { cali = (Calintf)CalEnv.getGlobalObject("calintfclass", Calintf.class); } catch (Throwable t) { throw new CalFacadeException(t); } try { cali.open(); // Just for the user interactions cali.beginTransaction(); boolean userCreated = cali.init(pars.getAuthUser(), pars.getUser(), pars.getPublicAdmin(), getGroups(), pars.getSynchId(), debug); // Prepare for call below. publicUserAccount = cali.getSyspars().getPublicUser(); BwUser auth;// XXX if (isPublicAdmin() || isGuest()) { if (isGuest()) { auth = getPublicUser(); } else { auth = cali.getUser(pars.getAuthUser()); } if (debug) { trace("Got auth user object " + auth); } dbi = new CalSvcDb(this, auth); if (userCreated) { initUser(auth, cali); } if (debug) { trace("PublicAdmin: " + pars.getPublicAdmin() + " user: " + pars.getUser()); } if (pars.getPublicAdmin()) { /* We may be running as a different user. The preferences we want to see * are those of the user we are running as - i.e. the 'run.as' user for * not those of the authenticated user. */ dbi.close(); BwUser user = cali.getUser(pars.getUser()); dbi = new CalSvcDb(this, user); } return cali; } finally { cali.endTransaction(); cali.close(); } } |
public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, | public BwFreeBusy getFreeBusy(Collection subs, BwCalendar cal, BwPrincipal who, | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
Collection subs; if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { | if (subs != null) { } else if (cal != null) { | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
eventPeriods.add(new EventPeriod(psdt, pedt)); | int type = BwFreeBusyComponent.typeBusy; if (BwEvent.statusTentative.equals(ev.getStatus())) { type = BwFreeBusyComponent.typeBusyTentative; } eventPeriods.add(new EventPeriod(psdt, pedt, type)); | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
} else if (ep.start.after(p.getEnd())) { | lastType = ep.type; } else if ((lastType != ep.type) || ep.start.after(p.getEnd())) { | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
if (fbc == null) { | if ((fbc == null) || (lastType != fbc.getType())) { | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
if (fbc != null) { fb.addTime(fbc); } | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
|
if (debug) { error(t); } | public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw new CalFacadeException("Unsupported: non user principal for free-busy"); } BwUser u = (BwUser)who; Collection subs; /* See if the calendar is a user root. */ if (cal != null) { String[] ss = cal.getPath().split("/"); int pathLength = ss.length - 1; // First element is empty string if ((pathLength == 2) && (ss[1].equals(getSyspars().getUserCalendarRoot()))) { cal = null; } } if (cal != null) { getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); BwSubscription sub = BwSubscription.makeSubscription(cal); subs = new ArrayList(); subs.add(sub); } else if (currentUser().equals(who)) { subs = getSubscriptions(); } else { cal = getCal().getCalendars(u, PrivilegeDefs.privReadFreeBusy); if (cal == null) { throw new CalFacadeAccessException(); } getCal().checkAccess(cal, PrivilegeDefs.privReadFreeBusy, false); subs = dbi.fetchPreferences(u).getSubscriptions(); } BwFreeBusy fb = new BwFreeBusy(who, start, end); Collection events = new TreeSet(); Iterator subit = subs.iterator(); while (subit.hasNext()) { BwSubscription sub = (BwSubscription)subit.next(); if (!sub.getAffectsFreeBusy()) { continue; } // XXX If it's an external subscription we probably just get free busy and // merge it in. Collection evs = getEvents(sub, null, start, end, CalFacadeDefs.retrieveRecurExpanded, true); // Filter out transparent events Iterator it = evs.iterator(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); if (!sub.getIgnoreTransparency() && BwEvent.transparencyTransparent.equals(ev.getTransparency())) { // Ignore this one. continue; } events.add(ei); } } try { if (granularity != null) { // chunked. GetPeriodsPars gpp = new GetPeriodsPars(); gpp.events = events; gpp.startDt = start; gpp.dur = granularity; gpp.tzcache = getTimezones(); BwFreeBusyComponent fbc = null; if (!returnAll) { // One component fbc = new BwFreeBusyComponent(); fb.addTime(fbc); } int limit = 10000; // XXX do this better /* endDt is null first time through, then represents end of last * segment. */ while ((gpp.endDt == null) || (gpp.endDt.before(end))) { //if (debug) { // trace("gpp.startDt=" + gpp.startDt + " end=" + end); //} if (limit < 0) { throw new CalFacadeException("org.bedework.svci.limit.exceeded"); } limit--; Collection periodEvents = CalFacadeUtil.getPeriodsEvents(gpp); if (returnAll) { fbc = new BwFreeBusyComponent(); fb.addTime(fbc); DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); if (periodEvents.size() == 0) { fbc.setType(BwFreeBusyComponent.typeFree); } } else if (periodEvents.size() != 0) { // Some events fall in the period. Add an entry. DateTime psdt = new DateTime(gpp.startDt.getDtval()); DateTime pedt = new DateTime(gpp.endDt.getDtval()); psdt.setUtc(true); pedt.setUtc(true); fbc.addPeriod(new Period(psdt, pedt)); } } return fb; } Iterator it = events.iterator(); TreeSet eventPeriods = new TreeSet(); while (it.hasNext()) { EventInfo ei = (EventInfo)it.next(); BwEvent ev = ei.getEvent(); // Ignore if times were specified and this event is outside the times BwDateTime estart = ev.getDtstart(); BwDateTime eend = ev.getDtend(); /* Don't report out of the requested period */ String dstart; String dend; if (estart.before(start)) { dstart = start.getDtval(); } else { dstart = estart.getDtval(); } if (eend.after(end)) { dend = end.getDtval(); } else { dend = eend.getDtval(); } DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt)); } /* iterate through the sorted periods combining them where they are adjacent or overlap */ Period p = null; /* For the moment just build a single BwFreeBusyComponent */ BwFreeBusyComponent fbc = null; it = eventPeriods.iterator(); while (it.hasNext()) { EventPeriod ep = (EventPeriod)it.next(); if (p == null) { p = new Period(ep.start, ep.end); } else if (ep.start.after(p.getEnd())) { // Non adjacent periods if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); p = new Period(ep.start, ep.end); } else if (ep.end.after(p.getEnd())) { // Extend the current period p = new Period(p.getStart(), ep.end); } // else it falls within the existing period } if (p != null) { if (fbc == null) { fbc = new BwFreeBusyComponent(); } fbc.addPeriod(p); } if (fbc != null) { fb.addTime(fbc); } } catch (Throwable t) { throw new CalFacadeException(t); } return fb; } |
|
msgSendMirror.meta_assignField(AGSymbol.alloc("receiver"), closures); | msgSendMirror.meta_assignField(AGSymbol.alloc("receiver"), NATMirrorFactory._INSTANCE_.base_createMirror(closures)); | public void testJavaMirrorFieldAccess() { try { AGMessageSend msgSend = new AGMessageSend( success, new AGMethodInvocationCreation( AGSymbol.alloc("at"), new NATTable(new ATObject[] { closures.base_getLength() }))); ATObject msgSendMirror = NATMirrorFactory._INSTANCE_. base_createMirror(msgSend); ATMirror receiver = (ATMirror)msgSendMirror.meta_select( msgSendMirror, AGSymbol.alloc("receiver")); receiver.base_getBase().asClosure().meta_apply(NATTable.EMPTY); msgSendMirror.meta_assignField(AGSymbol.alloc("receiver"), closures); ATMirror result = (ATMirror)msgSendMirror.meta_invoke( msgSendMirror, AGSymbol.alloc("eval"), new NATTable(new ATObject[] { new NATContext(lexicalRoot, lexicalRoot, NATNil._INSTANCE_) })); result.base_getBase().asClosure().meta_apply(NATTable.EMPTY); } catch (NATException e) { e.printStackTrace(); fail("exception: "+ e); } } |
"msgSendMirror.receiver := closures;", | "msgSendMirror.receiver := at.mirrors.Factory.createMirror(closures);", | public void testMirrorFieldAccess() { try { evaluateInput( "def msgSendMirror := at.mirrors.Factory.createMirror(" + " `(success.at(3)));" + "def receiver := msgSendMirror.receiver;" + "msgSendMirror.receiver := closures;", new NATContext(lexicalRoot, lexicalRoot, NATNil._INSTANCE_)); } catch (NATException e) { e.printStackTrace(); fail("exception: "+ e); } } |
"def responds := trueMirror.respondsTo( symbol(\"ifTrue:\") );" + "responds.getBase().ifTrue: success ifFalse: fail", | "def responds := trueMirror.respondsTo( symIfTrue );" + "def base := responds.base;" + "base.ifTrue: success ifFalse: fail", | public void testMirrorInvocation() { try { evaluateInput( "def trueMirror := at.mirrors.Factory.createMirror(true);" + "def responds := trueMirror.respondsTo( symbol(\"ifTrue:\") );" + "responds.getBase().ifTrue: success ifFalse: fail", new NATContext(lexicalRoot, lexicalRoot, NATNil._INSTANCE_)); } catch (NATException e) { e.printStackTrace(); fail("exception: "+ e); } } |
this.setLayoutManager(new org.eclipse.gmf.internal.codegen.draw2d.GridLayout()); | org.eclipse.gmf.internal.codegen.draw2d.GridLayout layoutThis = new org.eclipse.gmf.internal.codegen.draw2d.GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; this.setLayoutManager(layoutThis); | public InstanceNodeFigure() { this.setLayoutManager(new org.eclipse.gmf.internal.codegen.draw2d.GridLayout()); this.setFill(true); this.setFillXOR(false); this.setOutline(true); this.setOutlineXOR(false); this.setLineWidth(1); this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); createContents(); } |
eventInfo = new EventInfo(editEvent); | public BwEvent getEditEvent() { if (editEvent == null) { editEvent = new BwEventObj(); } return editEvent; } |
|
if (val != null) { | if (val == null) { getEventDates().setNewEvent(val, fetchSvci().getTimezones()); } else { | public void setEditEvent(BwEvent val) { try { editEvent = val; if (val != null) { getEventDates().setFromEvent(val, fetchSvci().getTimezones()); } } catch (Throwable t) { err.emit(t); } } |
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.StereotypeConstraintsEditPart.VISUAL_ID); | semanticHint = UMLVisualIDRegistry.getType(StereotypeConstraintsEditPart.VISUAL_ID); | protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.StereotypeConstraintsEditPart.VISUAL_ID); view.setType(semanticHint); } super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); setupCompartmentTitle(view); setupCompartmentCollapsed(view); if (!ProfileEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", ProfileEditPart.MODEL_ID); //$NON-NLS-1$ view.getEAnnotations().add(shortcutAnnotation); } } |
if (!random) { playNext(); } else { playRandom(); | if (isPlayAll()) { if (!isRandom()) { playNext(); } else { playRandom(); } | protected PlayerListener getConfigPlayerListener() { return new PlayerListener() { public void playbackStarted() { } public void playbackStopped() { } public void playbackCompleted() { if (!random) { playNext(); } else { playRandom(); } } }; } |
if (!random) { playNext(); } else { playRandom(); | if (isPlayAll()) { if (!isRandom()) { playNext(); } else { playRandom(); } | public void playbackCompleted() { if (!random) { playNext(); } else { playRandom(); } } |
player.stop(); player = null; | if (player != null) { player.stop(); player = null; } | public synchronized void stop() { player.stop(); player = null; } |
return access.getDefaultPublicAccess().toCharArray(); | return Access.getDefaultPublicAccess().toCharArray(); | private char[] getAclChars(BwShareableDbentity ent) throws CalFacadeException { if (ent instanceof BwShareableContainedDbentity) { BwCalendar container; if (ent instanceof BwCalendar) { container = (BwCalendar)ent; } else { container = ((BwShareableContainedDbentity)ent).getCalendar(); } String path = container.getPath(); PathInfo pi = pathInfoMap.getInfo(path); if (pi == null) { pi = getPathInfo(container); pathInfoMap.putInfo(path, pi); } char[] aclChars = pi.encoded; if (ent instanceof BwCalendar) { return aclChars; } /* Create a merged access string from the entity access and the * container access */ String entAccess = ent.getAccess(); /* if (entAccess == null) { // Nomerge needed return aclChars; } */ try { Acl acl = new Acl(); if (entAccess != null) { acl.decode(entAccess.toCharArray()); } acl.merge(aclChars); return acl.encodeAll(); } catch (Throwable t) { throw new CalFacadeException(t); } } /* This is a way of making other objects sort of shareable. * The objects are locations, sponsors and categories. * * We store the default access in the owner principal and manipulate that to give * us some degree of sharing. * * In effect, the owner becomes the container for the object. */ String aclString = null; String entAccess = ent.getAccess(); BwUser owner = ent.getOwner(); if (ent instanceof BwCategory) { aclString = owner.getCategoryAccess(); } else if (ent instanceof BwLocation) { aclString = owner.getLocationAccess(); } else if (ent instanceof BwSponsor) { aclString = owner.getSponsorAccess(); } if (aclString == null) { if (entAccess == null) { if (ent.getPublick()) { return access.getDefaultPublicAccess().toCharArray(); } return access.getDefaultPersonalAccess().toCharArray(); } return entAccess.toCharArray(); } if (entAccess == null) { return aclString.toCharArray(); } try { Acl acl = new Acl(); acl.decode(entAccess.toCharArray()); acl.merge(aclString.toCharArray()); return acl.getEncoded(); } catch (Throwable t) { throw new CalFacadeException(t); } } |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.