Search in sources :

Example 1 with LockInfo

use of org.talend.core.model.repository.LockInfo in project tdi-studio-se by Talend.

the class VersionAuthorSection method refresh.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
     */
@Override
public void refresh() {
    if (getAuthor() != null && getAuthor().getLogin() != null) {
        authorText.setText(getAuthor().getLogin());
    } else {
        //$NON-NLS-1$
        authorText.setText("");
    }
    //$NON-NLS-1$
    String locker = "";
    LockInfo lockInfo = getLockInfo();
    if (lockInfo != null) {
        locker = lockInfo.getUser();
    }
    lockerText.setText(locker);
    //$NON-NLS-1$
    versionText.setText(getVersion() == null ? "" : getVersion());
}
Also used : LockInfo(org.talend.core.model.repository.LockInfo)

Example 2 with LockInfo

use of org.talend.core.model.repository.LockInfo in project tdi-studio-se by Talend.

the class VersionAuthorSection method getLockInfo.

private LockInfo getLockInfo() {
    LockInfo lockInfo = null;
    Property property = getObject().getProperty();
    if (property == null) {
        return lockInfo;
    }
    Item item = property.getItem();
    if (item == null) {
        return lockInfo;
    }
    lockInfo = ProxyRepositoryFactory.getInstance().getLockInfo(item);
    return lockInfo;
}
Also used : Item(org.talend.core.model.properties.Item) LockInfo(org.talend.core.model.repository.LockInfo) Property(org.talend.core.model.properties.Property)

Aggregations

LockInfo (org.talend.core.model.repository.LockInfo)2 Item (org.talend.core.model.properties.Item)1 Property (org.talend.core.model.properties.Property)1