Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 254883 Details for
Bug 471589
Internal compiler error: java.lang.IllegalArgumentException: info cannot be null at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
SearchMyGroupTicketsSelectionHandler source code
SearchMyGroupTicketsSelectionHandler.java (text/plain), 6.44 KB, created by
dean thomsen
on 2015-07-01 09:42:58 EDT
(
hide
)
Description:
SearchMyGroupTicketsSelectionHandler source code
Filename:
MIME Type:
Creator:
dean thomsen
Created:
2015-07-01 09:42:58 EDT
Size:
6.44 KB
patch
obsolete
>package level3.ticketingConsole.views; > >import java.rmi.RemoteException; >import java.util.ArrayList; >import java.util.List; >import java.util.Map; > >import level3.clarify.ticketingservices.dataobjects.oncall.EmployeeDO; >import level3.clarify.ticketingservices.exceptions.DataValidationException; >import level3.clarify.ticketingservices.exceptions.NotSuccessResponseCodeException; >import level3.clarify.ticketingservices.ticketingconsole.TicketingConsoleDelegate; >import level3.clarify.ticketingservices.ticketingconsole.TicketingConsoleListItem; >import level3.clarify.ticketingservices.ticketingconsole.TicketingConsoleService; >import level3.ticketingConsole.utilities.ClarifyUserDetail; >import level3.ticketingConsole.views.ListViewBase.QueryCriteria; > >import org.eclipse.core.commands.AbstractHandler; >import org.eclipse.core.commands.ExecutionEvent; >import org.eclipse.core.commands.ExecutionException; >import org.eclipse.jface.dialogs.Dialog; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.ui.IWorkbenchWindow; >import org.eclipse.ui.handlers.HandlerUtil; > >import com.level3.rcp.sa.console.authentication.AuthenticationUtils; >import com.level3.rcp.sa.console.authentication.ClarifyUser; >import com.level3.rcputil.searchView.ISearch; >import com.level3.rcputil.searchView.SearchResultsManager; >import com.level3.sa.opsconsoleclarify.client.OpsConsoleClarifyClient; >import com.level3.sa.utils.LDAPUtils; > >/** > * Handles a request to search for tickets for another member of the user's > * group when there are a large number of members of the group to select from. A > * dialog box is opened that allows the user to filter and select a member of > * the group. The tickets for the selected user are then shown. > */ >public class SearchMyGroupTicketsSelectionHandler extends AbstractHandler { > > public static final String COMMAND_ID = "com.level3.ticketingConsole.searchMyGroupTicketsSelection"; > > private static AuthenticationUtils authUtils = AuthenticationUtils.getInstance(); > private static final String userName = ClarifyUser.getClarifyUser(authUtils) > .getClarifyUserName(); > > public Object execute(ExecutionEvent event) throws ExecutionException { > IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); > Shell shell = HandlerUtil.getActiveShellChecked(event); > > try { > TicketingConsoleService delegate = TicketingConsoleDelegate.getInstance( > ClarifyUserDetail.getInstance().getClarifyUser().getClarifyUserName()); > List[] wipbins = delegate.getWipbinsByUserName(userName); > List myGroupNames = wipbins[3]; > > boolean doItTheReallySlowWay = false; > > /* > * Build a list of EmpoyeeDO objects from the list of clarify login ids. > */ > List<EmployeeDO> groupMembers = new ArrayList<EmployeeDO>(); > for (Object groupNameObj : myGroupNames) { > String clarifyLogin = (String)groupNameObj; > > // HACK >// if (groupMembers.size() == 20) break; > > /* > * This usually returns only a single object, but if there are more, check for status=1 for > * the active id. The ClarifyUser object contains the NT login. > */ > EmployeeDO user = new EmployeeDO(); > > if (doItTheReallySlowWay) { > List<com.level3.sa.opsconsoleclarify.dataobjects.ClarifyUser> clarifyUsers; > try { > clarifyUsers = OpsConsoleClarifyClient.getInstance().getClarifyUsersForClarifyLogin( > clarifyLogin); > } catch (Exception e) { > throw new RuntimeException("Clarify Login: " + clarifyLogin, e); > } > > String ntLogin = null; > for (com.level3.sa.opsconsoleclarify.dataobjects.ClarifyUser clarifyUser : clarifyUsers) { > if (clarifyUser.getStatus().equals("Active")) { > ntLogin = clarifyUser.getNtLogin(); > break; > } > } > > if (ntLogin == null) { > // just make up values > user.setFirstName(""); > user.setLastName(clarifyLogin); > user.setTitle(""); > } else { > /* > * The LDAPUtils class in OpsConsoleServices returns a string like > * "150 - Service Assurance". LDAPUtils also has a helper method to extract the > * department number. > */ > String fullyQualifiedDepartment = LDAPUtils.findDepartmentForUser(ntLogin); >// String departmentNumber = LDAPUtils.parseDepartmentForNumber(fullyQualifiedDepartment); > user.setDepartment(fullyQualifiedDepartment); > > List<Map<String, Object[]>> x = LDAPUtils.showAllFields(ntLogin); > if (x.size() == 0) { > // just make up values > user.setFirstName(""); > user.setLastName(ntLogin); > user.setTitle(""); > } else { > Map<String, Object[]> params = x.get(0); > > // String name = (String)(params.get("name")[0]) > // String [] nameParts = name.split(","); > // user.setLastName(nameParts[0].trim()); > // user.setFirstName(nameParts[1].trim()); > > user.setFirstName(get(params, "givenName")); > user.setLastName(get(params, "sn")); > user.setTitle(get(params, "title")); > } > > System.out.println(x); > } > } else { > // Nothing is populated except the clarifyLogin (in the notes) > } > > user.setNotes(clarifyLogin); > > groupMembers.add(user); > } > > FilteredUsersSelectionDialog dialog = new FilteredUsersSelectionDialog(shell, groupMembers); > if (dialog.open() == Dialog.OK) { > boolean reuseSearchView = false; // TODO > > StringBuffer label = new StringBuffer(); > StringBuffer description = new StringBuffer(); > > String selectedUserName = dialog.getContact().getNotes(); > > label.append("Tickets - ").append(selectedUserName); > QueryCriteria currentCriteria = new QueryCriteria(new QueryCriteria(), "wipbin", null, selectedUserName, userName); > description.append("tickets for user ").append(selectedUserName); > > ISearch<TicketingConsoleListItem> search = new TroubleTicketResultsFromSelection(label.toString(), currentCriteria, > description.toString()); > SearchResultsManager.openView(window.getActivePage(), search, reuseSearchView); > } > } catch (DataValidationException e) { > throw new RuntimeException(e); > } catch (RemoteException e) { > throw new RuntimeException(e); > } catch (NotSuccessResponseCodeException e) { > throw new RuntimeException(e); > } > > return null; > } > > private String get(Map<String, Object[]> params, String key) { > Object[] values = params.get(key); > if (values == null) { > return null; > } else { > return (String)values[0]; > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 471589
: 254883