当前位置: 首页>>代码示例>>Java>>正文


Java Library类代码示例

本文整理汇总了Java中org.eclipse.emf.examples.extlibrary.Library的典型用法代码示例。如果您正苦于以下问题:Java Library类的具体用法?Java Library怎么用?Java Library使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Library类属于org.eclipse.emf.examples.extlibrary包,在下文中一共展示了Library类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setParentBranch

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setParentBranch(Library newParentBranch)
{
  if (newParentBranch != eInternalContainer() || (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH && newParentBranch != null))
  {
    if (EcoreUtil.isAncestor(this, newParentBranch))
      throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
    NotificationChain msgs = null;
    if (eInternalContainer() != null)
      msgs = eBasicRemoveFromContainer(msgs);
    if (newParentBranch != null)
      msgs = ((InternalEObject)newParentBranch).eInverseAdd(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
    msgs = basicSetParentBranch(newParentBranch, msgs);
    if (msgs != null) msgs.dispatch();
  }
  else if (eNotificationRequired())
    eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.LIBRARY__PARENT_BRANCH, newParentBranch, newParentBranch));
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:23,代码来源:LibraryImpl.java

示例2: eInverseAdd

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
  switch (featureID)
  {
    case EXTLibraryPackage.LIBRARY__BRANCHES:
      return ((InternalEList<InternalEObject>)(InternalEList<?>)getBranches()).basicAdd(otherEnd, msgs);
    case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
      if (eInternalContainer() != null)
        msgs = eBasicRemoveFromContainer(msgs);
      return basicSetParentBranch((Library)otherEnd, msgs);
  }
  return super.eInverseAdd(otherEnd, featureID, msgs);
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:21,代码来源:LibraryImpl.java

示例3: notifyChanged

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @Override
 public void notifyChanged(Notification notification)
 {
	updateChildren(notification);

	switch (notification.getFeatureID(Library.class)) {
		case EXTLibraryPackage.LIBRARY__ADDRESS:
		case EXTLibraryPackage.LIBRARY__NAME:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
		case EXTLibraryPackage.LIBRARY__WRITERS:
		case EXTLibraryPackage.LIBRARY__EMPLOYEES:
		case EXTLibraryPackage.LIBRARY__BORROWERS:
		case EXTLibraryPackage.LIBRARY__STOCK:
		case EXTLibraryPackage.LIBRARY__BRANCHES:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 
开发者ID:mbarbero,项目名称:econ-na-2014-emf-edit,代码行数:28,代码来源:LibraryItemProvider.java

示例4: getText

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
@Override
public String getText(Object element) {
	if (element instanceof Resource) {
		return ((Resource) element).getURI().toString();
	} else if (element instanceof EObject) {
		EObject eObject = (EObject) element;
		EClass eClass = eObject.eClass();
		String ret = eClass.getName() + " ";
		if (element instanceof Library) {
			ret += ((Library) element).getName();
		} else if (element instanceof Book) {
			ret += ((Book) element).getTitle();
		} else if (element instanceof Writer) {
			ret += ((Writer) element).getName();
		} else {
			ret += " [" + element.toString() + "]";
		}
		return ret;
	}
	return super.getText(element);
}
 
开发者ID:mbarbero,项目名称:econ-na-2014-emf-edit,代码行数:22,代码来源:YourFathersSWT.java

示例5: setParentBranch

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 public void setParentBranch(Library newParentBranch)
 {
	if (newParentBranch != eInternalContainer() || (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH && newParentBranch != null)) {
		if (EcoreUtil.isAncestor(this, newParentBranch))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParentBranch != null)
			msgs = ((InternalEObject)newParentBranch).eInverseAdd(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
		msgs = basicSetParentBranch(newParentBranch, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, EXTLibraryPackage.LIBRARY__PARENT_BRANCH, newParentBranch, newParentBranch));
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:22,代码来源:LibraryImpl.java

示例6: getBranches

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<Library> getBranches()
{
  if (branches == null)
  {
    branches = new EObjectContainmentWithInverseEList.Resolving<Library>(Library.class, this, EXTLibraryPackage.LIBRARY__BRANCHES, EXTLibraryPackage.LIBRARY__PARENT_BRANCH);
  }
  return branches;
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:14,代码来源:LibraryImpl.java

示例7: eBasicRemoveFromContainerFeature

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
{
  switch (eContainerFeatureID())
  {
    case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
      return eInternalContainer().eInverseRemove(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
  }
  return super.eBasicRemoveFromContainerFeature(msgs);
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:16,代码来源:LibraryImpl.java

示例8: eUnset

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID)
{
  switch (featureID)
  {
    case EXTLibraryPackage.LIBRARY__ADDRESS:
      setAddress(ADDRESS_EDEFAULT);
      return;
    case EXTLibraryPackage.LIBRARY__NAME:
      setName(NAME_EDEFAULT);
      return;
    case EXTLibraryPackage.LIBRARY__WRITERS:
      getWriters().clear();
      return;
    case EXTLibraryPackage.LIBRARY__EMPLOYEES:
      getEmployees().clear();
      return;
    case EXTLibraryPackage.LIBRARY__BORROWERS:
      getBorrowers().clear();
      return;
    case EXTLibraryPackage.LIBRARY__STOCK:
      getStock().clear();
      return;
    case EXTLibraryPackage.LIBRARY__BOOKS:
      getBooks().clear();
      return;
    case EXTLibraryPackage.LIBRARY__BRANCHES:
      getBranches().clear();
      return;
    case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
      setParentBranch((Library)null);
      return;
    case EXTLibraryPackage.LIBRARY__PEOPLE:
      getPeople().clear();
      return;
  }
  super.eUnset(featureID);
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:44,代码来源:LibraryImpl.java

示例9: getText

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @Override
 public String getText(Object object)
 {
	String label = ((Library)object).getName();
	return label == null || label.length() == 0 ?
		getString("_UI_Library_type") : //$NON-NLS-1$
		getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
 
开发者ID:mbarbero,项目名称:econ-na-2014-emf-edit,代码行数:15,代码来源:LibraryItemProvider.java

示例10: getBranches

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 public EList<Library> getBranches()
 {
	if (branches == null) {
		branches = new EObjectContainmentWithInverseEList.Resolving<Library>(Library.class, this, EXTLibraryPackage.LIBRARY__BRANCHES, EXTLibraryPackage.LIBRARY__PARENT_BRANCH);
	}
	return branches;
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:13,代码来源:LibraryImpl.java

示例11: eInverseAdd

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @SuppressWarnings("unchecked")
 @Override
 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
 {
	switch (featureID) {
		case EXTLibraryPackage.LIBRARY__BRANCHES:
			return ((InternalEList<InternalEObject>)(InternalEList<?>)getBranches()).basicAdd(otherEnd, msgs);
		case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			return basicSetParentBranch((Library)otherEnd, msgs);
	}
	return super.eInverseAdd(otherEnd, featureID, msgs);
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:20,代码来源:LibraryImpl.java

示例12: eBasicRemoveFromContainerFeature

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @Override
 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
 {
	switch (eContainerFeatureID()) {
		case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
			return eInternalContainer().eInverseRemove(this, EXTLibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
	}
	return super.eBasicRemoveFromContainerFeature(msgs);
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:15,代码来源:LibraryImpl.java

示例13: eUnset

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @Override
 public void eUnset(int featureID)
 {
	switch (featureID) {
		case EXTLibraryPackage.LIBRARY__ADDRESS:
			setAddress(ADDRESS_EDEFAULT);
			return;
		case EXTLibraryPackage.LIBRARY__NAME:
			setName(NAME_EDEFAULT);
			return;
		case EXTLibraryPackage.LIBRARY__WRITERS:
			getWriters().clear();
			return;
		case EXTLibraryPackage.LIBRARY__EMPLOYEES:
			getEmployees().clear();
			return;
		case EXTLibraryPackage.LIBRARY__BORROWERS:
			getBorrowers().clear();
			return;
		case EXTLibraryPackage.LIBRARY__STOCK:
			getStock().clear();
			return;
		case EXTLibraryPackage.LIBRARY__BOOKS:
			getBooks().clear();
			return;
		case EXTLibraryPackage.LIBRARY__BRANCHES:
			getBranches().clear();
			return;
		case EXTLibraryPackage.LIBRARY__PARENT_BRANCH:
			setParentBranch((Library)null);
			return;
		case EXTLibraryPackage.LIBRARY__PEOPLE:
			getPeople().clear();
			return;
	}
	super.eUnset(featureID);
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:43,代码来源:LibraryImpl.java

示例14: getParentBranch

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Library getParentBranch()
{
  if (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH) return null;
  return (Library)eContainer();
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:11,代码来源:LibraryImpl.java

示例15: basicGetParentBranch

import org.eclipse.emf.examples.extlibrary.Library; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Library basicGetParentBranch()
{
  if (eContainerFeatureID() != EXTLibraryPackage.LIBRARY__PARENT_BRANCH) return null;
  return (Library)eInternalContainer();
}
 
开发者ID:cbrun,项目名称:acceleo-launcher-examples,代码行数:11,代码来源:LibraryImpl.java


注:本文中的org.eclipse.emf.examples.extlibrary.Library类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。