Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2012 itemis AG (http://www.itemis.eu) and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html /
 
 package org.eclipse.xtext.ui.views;
 
import  org.eclipse.jface.viewers.ISelection;
import  org.eclipse.ui.IWorkbenchPart;

Author(s):
Michael Clay - Initial contribution and API
Since:
2.3
	private IWorkbenchPart workbenchPart;
	private ISelection selection;
	public IWorkbenchPart getWorkbenchPart() {
		return ;
	}
	public ISelection getSelection() {
		return ;
	}
	public DefaultWorkbenchPartSelection(IWorkbenchPart workbenchPart, ISelection selection) {
		this. = workbenchPart;
		this. = selection;
	}
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (( == null) ? 0 : .hashCode());
		result = prime * result + (( == null) ? 0 : .hashCode());
		return result;
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		if ( == null) {
			if (other.selection != null)
				return false;
else if (!.equals(other.selection))
			return false;
		if ( == null) {
			if (other.workbenchPart != null)
				return false;
else if (!.equals(other.workbenchPart))
			return false;
		return true;
	}
New to GrepCode? Check out our FAQ X